From 3541dd938c8bb6365dab08b0cc1be28414fd8d44 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 17 Sep 2020 16:49:38 +0000 Subject: [PATCH 001/113] feat: run synthtool --- .../.repo-metadata.json | 13 ++ .../CODE_OF_CONDUCT.md | 43 ++++ .../CONTRIBUTING.md | 65 ++++++ .../google-cloud-security-privateca/LICENSE | 202 ++++++++++++++++++ .../google-cloud-security-privateca/README.md | 125 +++++++++++ 5 files changed, 448 insertions(+) create mode 100644 packages/google-cloud-security-privateca/.repo-metadata.json create mode 100644 packages/google-cloud-security-privateca/CODE_OF_CONDUCT.md create mode 100644 packages/google-cloud-security-privateca/CONTRIBUTING.md create mode 100644 packages/google-cloud-security-privateca/LICENSE create mode 100644 packages/google-cloud-security-privateca/README.md diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json new file mode 100644 index 00000000000..9da26270c24 --- /dev/null +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "nodejs-security-private-ca", + "name_pretty": "Google Cloud Certificate Authority", + "product_documentation": "https://cloud.google.com/certificate-authority-service", + "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", + "issue_tracker": "", + "release_level": "beta", + "language": "nodejs", + "repo": "googleapis/nodejs-security-private-ca", + "distribution_name": "@google-cloud/security-private-ca", + "api_id": "privateca.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-cloud-security-privateca/CODE_OF_CONDUCT.md b/packages/google-cloud-security-privateca/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..46b2a08ea6d --- /dev/null +++ b/packages/google-cloud-security-privateca/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-security-privateca/CONTRIBUTING.md b/packages/google-cloud-security-privateca/CONTRIBUTING.md new file mode 100644 index 00000000000..f6c4cf010e3 --- /dev/null +++ b/packages/google-cloud-security-privateca/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-security-privateca/LICENSE b/packages/google-cloud-security-privateca/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-cloud-security-privateca/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-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md new file mode 100644 index 00000000000..3b21bc91369 --- /dev/null +++ b/packages/google-cloud-security-privateca/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 + +# [Google Cloud Certificate Authority: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) + +[![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/privateca.svg)](https://www.npmjs.org/package/privateca) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) + + + + +Privateca client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/nodejs-security-private-ca/blob/master/CHANGELOG.md). + +* [Google Cloud Certificate Authority Node.js Client API Reference][client-docs] +* [Google Cloud Certificate Authority Documentation][product-docs] +* [github.com/googleapis/nodejs-security-private-ca](https://github.com/googleapis/nodejs-security-private-ca) + +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 Google Cloud Certificate Authority 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 privateca +``` + + + + + +The [Google Cloud Certificate Authority 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-security-private-ca/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-security-private-ca/blob/master/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/security-private-ca/latest/index.html +[product-docs]: https://cloud.google.com/certificate-authority-service +[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=privateca.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started From 39fb2596b1b4d853c54c9f2291ea97715cc67c1b Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Wed, 23 Sep 2020 03:29:11 +0000 Subject: [PATCH 002/113] feat: initial stub of library --- .../.eslintignore | 6 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../.gitignore | 14 + .../google-cloud-security-privateca/.jsdoc.js | 55 + .../.mocharc.js | 29 + .../google-cloud-security-privateca/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../api-extractor.json | 369 + .../linkinator.config.json | 10 + .../package.json | 64 + .../privateca/v1beta1/resources.proto | 883 + .../security/privateca/v1beta1/service.proto | 1040 + .../protos/protos.d.ts | 13274 +++++++ .../protos/protos.js | 33177 ++++++++++++++++ .../protos/protos.json | 3557 ++ .../src/index.ts | 25 + .../certificate_authority_service_client.ts | 4509 +++ ...icate_authority_service_client_config.json | 151 + ...tificate_authority_service_proto_list.json | 4 + .../src/v1beta1/index.ts | 19 + .../synth.metadata | 37 + .../google-cloud-security-privateca/synth.py | 41 + .../system-test/fixtures/sample/src/index.js | 26 + .../system-test/fixtures/sample/src/index.ts | 25 + .../system-test/install.ts | 51 + ...c_certificate_authority_service_v1beta1.ts | 5471 +++ .../tsconfig.json | 19 + .../webpack.config.js | 64 + 30 files changed, 62974 insertions(+) create mode 100644 packages/google-cloud-security-privateca/.eslintignore create mode 100644 packages/google-cloud-security-privateca/.eslintrc.json create mode 100644 packages/google-cloud-security-privateca/.gitattributes create mode 100644 packages/google-cloud-security-privateca/.gitignore create mode 100644 packages/google-cloud-security-privateca/.jsdoc.js create mode 100644 packages/google-cloud-security-privateca/.mocharc.js create mode 100644 packages/google-cloud-security-privateca/.nycrc create mode 100644 packages/google-cloud-security-privateca/.prettierignore create mode 100644 packages/google-cloud-security-privateca/.prettierrc.js create mode 100644 packages/google-cloud-security-privateca/api-extractor.json create mode 100644 packages/google-cloud-security-privateca/linkinator.config.json create mode 100644 packages/google-cloud-security-privateca/package.json create mode 100644 packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto create mode 100644 packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto create mode 100644 packages/google-cloud-security-privateca/protos/protos.d.ts create mode 100644 packages/google-cloud-security-privateca/protos/protos.js create mode 100644 packages/google-cloud-security-privateca/protos/protos.json create mode 100644 packages/google-cloud-security-privateca/src/index.ts create mode 100644 packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts create mode 100644 packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json create mode 100644 packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_proto_list.json create mode 100644 packages/google-cloud-security-privateca/src/v1beta1/index.ts create mode 100644 packages/google-cloud-security-privateca/synth.metadata create mode 100644 packages/google-cloud-security-privateca/synth.py create mode 100644 packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-cloud-security-privateca/system-test/install.ts create mode 100644 packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts create mode 100644 packages/google-cloud-security-privateca/tsconfig.json create mode 100644 packages/google-cloud-security-privateca/webpack.config.js diff --git a/packages/google-cloud-security-privateca/.eslintignore b/packages/google-cloud-security-privateca/.eslintignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-security-privateca/.eslintignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-security-privateca/.eslintrc.json b/packages/google-cloud-security-privateca/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-cloud-security-privateca/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-cloud-security-privateca/.gitattributes b/packages/google-cloud-security-privateca/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-cloud-security-privateca/.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-security-privateca/.gitignore b/packages/google-cloud-security-privateca/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-cloud-security-privateca/.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-security-privateca/.jsdoc.js b/packages/google-cloud-security-privateca/.jsdoc.js new file mode 100644 index 00000000000..ddb002f575e --- /dev/null +++ b/packages/google-cloud-security-privateca/.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: 'privateca', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-cloud-security-privateca/.mocharc.js b/packages/google-cloud-security-privateca/.mocharc.js new file mode 100644 index 00000000000..0b600509bed --- /dev/null +++ b/packages/google-cloud-security-privateca/.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-security-privateca/.nycrc b/packages/google-cloud-security-privateca/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-cloud-security-privateca/.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-security-privateca/.prettierignore b/packages/google-cloud-security-privateca/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-cloud-security-privateca/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-cloud-security-privateca/.prettierrc.js b/packages/google-cloud-security-privateca/.prettierrc.js new file mode 100644 index 00000000000..d1b95106f4c --- /dev/null +++ b/packages/google-cloud-security-privateca/.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-security-privateca/api-extractor.json b/packages/google-cloud-security-privateca/api-extractor.json new file mode 100644 index 00000000000..de228294b23 --- /dev/null +++ b/packages/google-cloud-security-privateca/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-security-privateca/linkinator.config.json b/packages/google-cloud-security-privateca/linkinator.config.json new file mode 100644 index 00000000000..29a223b6db6 --- /dev/null +++ b/packages/google-cloud-security-privateca/linkinator.config.json @@ -0,0 +1,10 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io" + ], + "silent": true, + "concurrency": 10 +} diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json new file mode 100644 index 00000000000..7c2d6b4e912 --- /dev/null +++ b/packages/google-cloud-security-privateca/package.json @@ -0,0 +1,64 @@ +{ + "name": "privateca", + "version": "0.1.0", + "description": "Privateca client for Node.js", + "repository": "googleapis/nodejs-privateca", + "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 privateca", + "privateca", + "certificate authority service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-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-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto new file mode 100644 index 00000000000..44b37d2dadb --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto @@ -0,0 +1,883 @@ +// 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.security.privateca.v1beta1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1;privateca"; +option java_multiple_files = true; +option java_outer_classname = "PrivateCaResourcesProto"; +option java_package = "com.google.cloud.security.privateca.v1beta1"; + +// A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] represents an individual Certificate Authority. +// A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. +message CertificateAuthority { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateAuthority" + pattern: "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}" + }; + + // Options that affect all certificates issued by a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + message IssuingOptions { + // Required. When true, includes a URL to the issuing CA certificate in the + // "authority information access" X.509 extension. + bool include_ca_cert_url = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When true, includes a URL to the CRL corresponding to certificates + // issued from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + // CRLs will expire 7 days from their creation. However, we will rebuild + // daily. CRLs are also rebuilt shortly after a certificate is revoked. + bool include_crl_access_url = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // The issuing policy for a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] will not be successfully issued from this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] if they violate the policy. + message CertificateAuthorityPolicy { + message AllowedConfigList { + // Required. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper]. If a + // [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] has an empty field, any value will be + // allowed for that field. + repeated ReusableConfigWrapper allowed_config_values = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] specifies the allowed values for + // [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] when issuing + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + message AllowedSubjectAltNames { + // Optional. Contains valid, fully-qualified host names. Glob patterns are also + // supported. To allow an explicit wildcard certificate, escape with + // backlash (i.e. "\*"). + // E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not + // *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set. + // E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not + // 'foo.bar.com'. + repeated string allowed_dns_names = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To + // match across path seperators (i.e. '/') use the double star glob + // pattern (i.e. '**'). + repeated string allowed_uris = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains valid RFC 2822 E-mail addresses. Glob patterns are also + // supported. + repeated string allowed_email_addresses = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Contains valid 32-bit IPv4 addresses and subnet ranges or RFC 4291 IPv6 + // addresses and subnet ranges. Subnet ranges are specified using the + // '/' notation (e.g. 10.0.0.0/8, 2001:700:300:1800::/64). Glob patterns + // are supported only for ip address entries (i.e. not for subnet ranges). + repeated string allowed_ips = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies if glob patterns used for [allowed_dns_names][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowed_dns_names] allows + // wildcard certificates. + bool allow_globbing_dns_wildcards = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specifies if to allow custom X509Extension values. + bool allow_custom_sans = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] specifies the allowed ways in which + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] may be requested from this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + message IssuanceModes { + // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by + // specifying a CSR. + bool allow_csr_based_issuance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate] by + // specifying a [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig]. + bool allow_config_based_issuance = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Allowed configurations or a single configuration for all issued + // certificates. + oneof config_policy { + // Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // must match at least one listed [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] in the list. + AllowedConfigList allowed_config_list = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. All [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // will use the provided configuration values, overwriting any requested + // configuration values. + ReusableConfigWrapper overwrite_config_values = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. If any [Subject][google.cloud.security.privateca.v1beta1.Subject] is specified here, then all + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must + // match at least one listed [Subject][google.cloud.security.privateca.v1beta1.Subject]. If a [Subject][google.cloud.security.privateca.v1beta1.Subject] has an empty + // field, any value will be allowed for that field. + repeated Subject allowed_locations_and_organizations = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If any value is specified here, then all + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must + // match at least one listed value. If no value is specified, all values + // will be allowed for this fied. Glob patterns are also supported. + repeated string allowed_common_names = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If a [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames] is specified here, then all + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] issued by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must + // match [AllowedSubjectAltNames][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames]. If no value or an empty value + // is specified, any value will be allowed for the [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] + // field. + AllowedSubjectAltNames allowed_sans = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum lifetime allowed by the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. Note that + // if the any part if the issuing chain expires before a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]'s + // requested maximum_lifetime, the effective lifetime will be explicitly + // truncated. + google.protobuf.Duration maximum_lifetime = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes] may be + // used to issue [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + IssuanceModes allowed_issuance_modes = 8 [(google.api.field_behavior) = OPTIONAL]; + } + + // URLs where a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will publish content. + message AccessUrls { + // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate is + // published. This will only be set for CAs that have been activated. + string ca_certificate_access_url = 1; + + // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CRLs are published. This + // will only be set for CAs that have been activated. + string crl_access_url = 2; + } + + // A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will use. + message KeyVersionSpec { + oneof KeyVersion { + // Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the + // format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + // This option enables full flexibility in the key's capabilities and + // properties. + string cloud_kms_key_version = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The algorithm to use for creating a managed Cloud KMS key for a for a + // simplified experience. All managed keys will be have their + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. + SignHashAlgorithm algorithm = 2 [(google.api.field_behavior) = REQUIRED]; + } + } + + // The type of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its issuing chain. + enum Type { + // Not specified. + TYPE_UNSPECIFIED = 0; + + // Self-signed CA. + SELF_SIGNED = 1; + + // Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // or an unmanaged CA. + SUBORDINATE = 2; + } + + // The tier of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating its supported + // functionality and/or billing SKU. + enum Tier { + // Not specified. + TIER_UNSPECIFIED = 0; + + // Enterprise tier. + ENTERPRISE = 1; + + // DevOps tier. + DEVOPS = 2; + } + + // The state of a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], indicating if it can be used. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // Certificates can be issued from this CA. CRLs will be generated for this + // CA. + ENABLED = 1; + + // Certificates cannot be issued from this CA. CRLs will still be generated. + DISABLED = 2; + + // Certificates cannot be issued from this CA. CRLs will not be generated. + PENDING_ACTIVATION = 3; + + // Certificates cannot be issued from this CA. CRLs will not be generated. + PENDING_DELETION = 4; + } + + // The algorithm of a Cloud KMS CryptoKeyVersion of a + // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the + // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value + // `ASYMMETRIC_SIGN`. These values correspond to the + // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKey.CryptoKeyVersion.CryptoKeyVersionAlgorithm]. + // values. + enum SignHashAlgorithm { + // Not specified. + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 + RSA_PSS_2048_SHA_256 = 1; + + // maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 + RSA_PSS_3072_SHA_256 = 2; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 + RSA_PSS_4096_SHA_256 = 3; + + // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 + EC_P256_SHA256 = 4; + + // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 + EC_P384_SHA384 = 5; + } + + // Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The [Type][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The [Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier] of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + Tier tier = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The config used to create a self-signed X.509 certificate or CSR. + CertificateConfig config = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. The desired lifetime of the CA certificate. Used to create the + // "not_before_time" and "not_after_time" fields inside an X.509 + // certificate. + google.protobuf.Duration lifetime = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. If this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] is a self-signed CertificateAuthority, this key + // is also used to sign the self-signed CA certificate. Otherwise, it + // is used to sign a CSR. + KeyVersionSpec key_spec = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The [CertificateAuthorityPolicy][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy] to enforce when issuing + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + CertificateAuthorityPolicy certificate_policy = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [IssuingOptions][google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions] to follow when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate] + // from this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + IssuingOptions issuing_options = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], this field will be set + // with the subordinate configuration, which describes its issuers. This may + // be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] must continue to validate. + SubordinateConfig subordinate_config = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate chain, including the current + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. Ordered such that the root issuer + // is the final element (consistent with RFC 5246). For a self-signed CA, this + // will only list the current [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s certificate. + repeated string pem_ca_certificates = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]'s CA certificate + // and its issuers. Ordered as self-to-root. + repeated CertificateDescription ca_certificate_descriptions = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will + // publish content, such as the CA certificate and CRLs. This must be a bucket + // name, without any prefixes (such as `gs://`) or suffixes (such as + // `.googleapis.com`). For example, to use a bucket named `my-bucket`, you + // would simply specify `my-bucket`. If not specified, a managed bucket will + // be created. + string gcs_bucket = 13 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. URLs for accessing content published by this CA, such as the CA certificate + // and CRLs. + AccessUrls access_urls = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was created. + google.protobuf.Timestamp create_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] was updated. + google.protobuf.Timestamp update_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] will be deleted, if + // scheduled for deletion. + google.protobuf.Timestamp delete_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 18 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] corresponds to a signed X.509 certificate +// Revocation List (CRL). A CRL contains the serial numbers of certificates that +// should no longer be trusted. +message CertificateRevocationList { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateRevocationList" + pattern: "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}" + }; + + // Describes a revoked [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + message RevokedCertificate { + // The resource path for the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format + // `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + string certificate = 1; + + // The serial number of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + string hex_serial_number = 2; + + // The reason the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked. + RevocationReason revocation_reason = 3; + } + + // The state of a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], indicating if it is current. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is up to date. + ACTIVE = 1; + + // The [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] is no longer current. + SUPERSEDED = 2; + } + + // Output only. The resource path for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in + // the format + // `projects/*/locations/*/certificateAuthorities/*/ + // certificateRevocationLists/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The CRL sequence number that appears in pem_crl. + int64 sequence_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revoked serial numbers that appear in pem_crl. + repeated RevokedCertificate revoked_certificates = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PEM-encoded X.509 CRL. + string pem_crl = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location where 'pem_crl' can be accessed. + string access_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [State][google.cloud.security.privateca.v1beta1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] was updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] corresponds to a signed X.509 certificate issued by a +// [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. +message Certificate { + option (google.api.resource) = { + type: "privateca.googleapis.com/Certificate" + pattern: "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}" + }; + + // Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + message RevocationDetails { + // Indicates why a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked. + RevocationReason revocation_state = 1; + + // The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was revoked. + google.protobuf.Timestamp revocation_time = 2; + } + + // Output only. The resource path for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the format + // `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The config used to create a signed X.509 certificate. + oneof certificate_config { + // Immutable. A pem-encoded X.509 certificate signing request (CSR). + string pem_csr = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A description of the certificate and key that does not require X.509 or + // ASN.1. + CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Required. The desired lifetime of a certificate. Used to create the + // "not_before_time" and "not_after_time" fields inside an X.509 + // certificate. Note that the lifetime may be truncated if it would extend + // past the life of any certificate authority in the issuing chain. + google.protobuf.Duration lifetime = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This + // [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present. + RevocationDetails revocation_details = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pem-encoded, signed X.509 certificate. + string pem_certificate = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A structured description of the issued X.509 certificate. + CertificateDescription certificate_description = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The chain that may be used to verify the X.509 certificate. Expected to be + // in issuer-to-root order according to RFC 5246. + repeated string pem_certificate_chain = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was created. + google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] was updated. + google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] refers to a managed [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. Those, in +// turn, are used to describe certain fields of an X.509 certificate, such as +// the key usage fields, fields specific to CA certificates, certificate policy +// extensions and custom extensions. +message ReusableConfig { + option (google.api.resource) = { + type: "privateca.googleapis.com/ReusableConfig" + pattern: "projects/{project}/locations/{location}/reusableConfigs/{reusable_config}" + }; + + // Output only. The resource path for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + // `projects/*/locations/*/reusableConfigs/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The config values. + ReusableConfigValues values = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A human-readable description of scenarios these ReusableConfigValues may be + // compatible with. + string description = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] was updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] is used to describe certain fields of an +// X.509 certificate, such as the key usage fields, fields specific to CA +// certificates, certificate policy extensions and custom extensions. +message ReusableConfigValues { + // Describes values that are relevant in a CA certificate. + message CaOptions { + // Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this + // value is missing, the extension will be omitted from the CA certificate. + google.protobuf.BoolValue is_ca = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Refers to the path length restriction X.509 extension. For a CA + // certificate, this value describes the depth of subordinate CA + // certificates that are allowed. + // If this value is less than 0, the request will fail. + // If this value is missing, the max path length will be omitted from the + // CA certificate. + google.protobuf.Int32Value max_issuer_path_length = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Indicates the intended use for keys that correspond to a certificate. + KeyUsage key_usage = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes options in this [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues] that are + // relevant in a CA certificate. + CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the X.509 certificate policy object identifiers, per + // https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280 + repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses + // that appear in the "Authority Information Access" extension in the + // certificate. + repeated string aia_ocsp_servers = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes custom X.509 extensions. + repeated X509Extension additional_extensions = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] describes values that may assist in creating an +// X.509 certificate, or a reference to a pre-defined set of values. +message ReusableConfigWrapper { + // Reusable or inline config values. + oneof config_values { + // Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + // `projects/*/locations/*/reusableConfigs/*`. + string reusable_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues]. + ReusableConfigValues reusable_config_values = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// Describes a subordinate CA's issuers. This is either a resource path to a +// known issuing [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], or a PEM issuer certificate chain. +message SubordinateConfig { + // This message describes a subordinate CA's issuer certificate chain. This + // wrapper exists for compatibility reasons. + message SubordinateConfigChain { + // Required. Expected to be in leaf-to-root order according to RFC 5246. + repeated string pem_certificates = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof subordinate_config { + // Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the same project that + // was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. This field + // is used for information and usability purposes only. The resource name + // is in the format `projects/*/locations/*/certificateAuthorities/*`. + string certificate_authority = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Contains the PEM certificate chain for the issuers of this + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority], but not pem certificate for this CA itself. + SubordinateConfigChain pem_issuer_chain = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// A [PublicKey][google.cloud.security.privateca.v1beta1.PublicKey] describes a public key. +message PublicKey { + // Types of public keys that are supported. + // At a minimum, we support RSA and ECDSA, for the key sizes or curves listed: + // https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms + enum KeyType { + // Default unspecified value. + KEY_TYPE_UNSPECIFIED = 0; + + // A PEM-encoded PKCS#1/RFC 3447 RSAPrivateKey structure. + PEM_RSA_KEY = 1; + + // A PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key. + PEM_EC_KEY = 2; + } + + // Required. The type of public key. + KeyType type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A public key. Padding and encoding varies by 'KeyType' and is described + // along with the KeyType values. + bytes key = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A [CertificateConfig][google.cloud.security.privateca.v1beta1.CertificateConfig] describes an X.509 certificate or CSR that is to be +// created, as an alternative to using ASN.1. +message CertificateConfig { + // These values are used to create the distinguished name and subject + // alternative name fields in an X.509 certificate. + message SubjectConfig { + // Required. Contains distinguished name fields such as the location and organization. + Subject subject = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The "common name" of the distinguished name. + string common_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The subject alternative name fields. + SubjectAltNames subject_alt_name = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Specifies some of the values in a certificate that are related to the + // subject. + SubjectConfig subject_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Describes how some of the technical fields in a certificate should be + // populated. + ReusableConfigWrapper reusable_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The public key that corresponds to this config. This is, for example, used + // when issuing [Certificates][google.cloud.security.privateca.v1beta1.Certificate], but not when creating a + // self-signed [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] CSR. + PublicKey public_key = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateDescription][google.cloud.security.privateca.v1beta1.CertificateDescription] describes an X.509 certificate or CSR that has +// been issued, as an alternative to using ASN.1 / X.509. +message CertificateDescription { + // These values describe fields in an issued X.509 certificate such as the + // distinguished name, subject alternative names, serial number, and lifetime. + message SubjectDescription { + // Contains distinguished name fields such as the location and organization. + Subject subject = 1; + + // The "common name" of the distinguished name. + string common_name = 2; + + // The subject alternative name fields. + SubjectAltNames subject_alt_name = 3; + + // The serial number encoded in lowercase hexadecimal. + string hex_serial_number = 4; + + // For convenience, the actual lifetime of an issued certificate. + // Corresponds to 'not_after_time' - 'not_before_time'. + google.protobuf.Duration lifetime = 5; + + // The time at which the certificate becomes valid. + google.protobuf.Timestamp not_before_time = 6; + + // The time at which the certificate expires. + google.protobuf.Timestamp not_after_time = 7; + } + + // A KeyId identifies a specific public key, usually by hashing the public + // key. + message KeyId { + // Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most + // likely the 160 bit SHA-1 hash of the public key. + string key_id = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // A group of fingerprints for the x509 certificate. + message CertificateFingerprint { + // The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. + string sha256_hash = 1; + } + + // Describes some of the values in a certificate that are related to the + // subject and lifetime. + SubjectDescription subject_description = 1; + + // Describes some of the technical fields in a certificate. + ReusableConfigValues config_values = 2; + + // The public key that corresponds to an issued certificate. + PublicKey public_key = 3; + + // Provides a means of identifiying certificates that contain a particular + // public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. + KeyId subject_key_id = 4; + + // Identifies the subject_key_id of the parent certificate, per + // https://tools.ietf.org/html/rfc5280#section-4.2.1.1 + KeyId authority_key_id = 5; + + // Describes a list of locations to obtain CRL information, i.e. + // the DistributionPoint.fullName described by + // https://tools.ietf.org/html/rfc5280#section-4.2.1.13 + repeated string crl_distribution_points = 6; + + // Describes lists of issuer CA certificate URLs that appear in the + // "Authority Information Access" extension in the certificate. + repeated string aia_issuing_certificate_urls = 7; + + // The hash of the x.509 certificate. + CertificateFingerprint cert_fingerprint = 8; +} + +// An [ObjectId][google.cloud.security.privateca.v1beta1.ObjectId] specifies an object identifier (OID). These provide context +// and describe types in ASN.1 messages. +message ObjectId { + // Required. The parts of an OID path. The most significant parts of the path come + // first. + repeated int32 object_id_path = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// An [X509Extension][google.cloud.security.privateca.v1beta1.X509Extension] specifies an X.509 extension, which may be used in +// different parts of X.509 objects like certificates, CSRs, and CRLs. +message X509Extension { + // Required. The OID for this X.509 extension. + ObjectId object_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates whether or not this extension is critical (i.e., if the client + // does not know how to handle this extension, the client should consider this + // to be an error). + bool critical = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of this X.509 extension. + bytes value = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A [KeyUsage][google.cloud.security.privateca.v1beta1.KeyUsage] describes key usage values that may appear in an X.509 +// certificate. +message KeyUsage { + // [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions] corresponds to the key usage values + // described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3. + message KeyUsageOptions { + // The key may be used for digital signatures. + bool digital_signature = 1; + + // The key may be used for cryptographic commitments. Note that this may + // also be referred to as "non-repudiation". + bool content_commitment = 2; + + // The key may be used to encipher other keys. + bool key_encipherment = 3; + + // The key may be used to encipher data. + bool data_encipherment = 4; + + // The key may be used in a key agreement protocol. + bool key_agreement = 5; + + // The key may be used to sign certificates. + bool cert_sign = 6; + + // The key may be used sign certificate revocation lists. + bool crl_sign = 7; + + // The key may be used to encipher only. + bool encipher_only = 8; + + // The key may be used to decipher only. + bool decipher_only = 9; + } + + // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to + // certain common OIDs that could be specified as an extended key usage value. + message ExtendedKeyUsageOptions { + // Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW + // server authentication", though regularly used for non-WWW TLS. + bool server_auth = 1; + + // Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW + // client authentication", though regularly used for non-WWW TLS. + bool client_auth = 2; + + // Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of + // downloadable executable code client authentication". + bool code_signing = 3; + + // Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email + // protection". + bool email_protection = 4; + + // Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding + // the hash of an object to a time". + bool time_stamping = 5; + + // Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing + // OCSP responses". + bool ocsp_signing = 6; + } + + // Describes high-level ways in which a key may be used. + KeyUsageOptions base_key_usage = 1; + + // Detailed scenarios in which a key may be used. + ExtendedKeyUsageOptions extended_key_usage = 2; + + // Used to describe extended key usages that are not listed in the + // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions] message. + repeated ObjectId unknown_extended_key_usages = 3; +} + +// [Subject][google.cloud.security.privateca.v1beta1.Subject] describes parts of a distinguished name that, in turn, +// describes the subject of the certificate. +message Subject { + // The country code of the subject. + string country_code = 1; + + // The organization of the subject. + string organization = 2; + + // The organizational_unit of the subject. + string organizational_unit = 3; + + // The locality or city of the subject. + string locality = 4; + + // The province, territory, or regional state of the subject. + string province = 5; + + // The street address of the subject. + string street_address = 6; + + // The postal code of the subject. + string postal_code = 7; +} + +// [SubjectAltNames][google.cloud.security.privateca.v1beta1.SubjectAltNames] corresponds to a more modern way of listing what +// the asserted identity is in a certificate (i.e., compared to the "common +// name" in the distinguished name). +message SubjectAltNames { + // Contains only valid, fully-qualified host names. + repeated string dns_names = 1; + + // Contains only valid RFC 3986 URIs. + repeated string uris = 2; + + // Contains only valid RFC 2822 E-mail addresses. + repeated string email_addresses = 3; + + // Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. + repeated string ip_addresses = 4; + + // Contains additional subject alternative name values. + repeated X509Extension custom_sans = 5; +} + +// A [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been revoked, +// and the reason for revocation. These are standard revocation reasons from RFC +// 5280. +enum RevocationReason { + // Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] + // has been revoked, but that a reason has not been recorded. + REVOCATION_REASON_UNSPECIFIED = 0; + + // Key material for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] may have leaked. + KEY_COMPROMISE = 1; + + // The key material for a certificate authority in the issuing path may have + // leaked. + CERTIFICATE_AUTHORITY_COMPROMISE = 2; + + // The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] have changed. + AFFILIATION_CHANGED = 3; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been superseded. + SUPERSEDED = 4; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] or entities in the issuing path have ceased to + // operate. + CESSATION_OF_OPERATION = 5; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] should not be considered valid, it is expected that it + // may become valid in the future. + CERTIFICATE_HOLD = 6; + + // This [Certificate][google.cloud.security.privateca.v1beta1.Certificate] no longer has permission to assert the listed + // attributes. + PRIVILEGE_WITHDRAWN = 7; + + // The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] + // may have been compromised. + ATTRIBUTE_AUTHORITY_COMPROMISE = 8; +} diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto new file mode 100644 index 00000000000..cda5fde4587 --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto @@ -0,0 +1,1040 @@ +// 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.security.privateca.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/security/privateca/v1beta1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1Beta1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1;privateca"; +option java_multiple_files = true; +option java_outer_classname = "PrivateCaProto"; +option java_package = "com.google.cloud.security.privateca.v1beta1"; + +// [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private +// certificate authorities and issued certificates. +service CertificateAuthorityService { + option (google.api.default_host) = "privateca.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc CreateCertificate(CreateCertificateRequest) returns (Certificate) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates" + body: "certificate" + }; + option (google.api.method_signature) = "parent,certificate,certificate_id"; + } + + // Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc GetCertificate(GetCertificateRequest) returns (Certificate) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + rpc ListCertificates(ListCertificatesRequest) returns (ListCertificatesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates" + }; + option (google.api.method_signature) = "parent"; + } + + // Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc RevokeCertificate(RevokeCertificateRequest) returns (Certificate) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + rpc UpdateCertificate(UpdateCertificateRequest) returns (Certificate) { + option (google.api.http) = { + patch: "/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}" + body: "certificate" + }; + option (google.api.method_signature) = "certificate,update_mask"; + } + + // Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state + // [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is + // of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the + // parent Certificate Authority signs a certificate signing request from + // [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation + // process. + rpc ActivateCertificateAuthority(ActivateCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:activate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location. + rpc CreateCertificateAuthority(CreateCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities" + body: "certificate_authority" + }; + option (google.api.method_signature) = "parent,certificate_authority,certificate_authority_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc DisableCertificateAuthority(DisableCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc EnableCertificateAuthority(EnableCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:enable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // that is in state + // [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is + // of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must + // then be signed by the desired parent Certificate Authority, which could be + // another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem + // certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. + rpc FetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest) returns (FetchCertificateAuthorityCsrResponse) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc GetCertificateAuthority(GetCertificateAuthorityRequest) returns (CertificateAuthority) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc ListCertificateAuthorities(ListCertificateAuthoritiesRequest) returns (ListCertificateAuthoritiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities" + }; + option (google.api.method_signature) = "parent"; + } + + // Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion. + rpc RestoreCertificateAuthority(RestoreCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:restore" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion. + rpc ScheduleDeleteCertificateAuthority(ScheduleDeleteCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:scheduleDelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc UpdateCertificateAuthority(UpdateCertificateAuthorityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{certificate_authority.name=projects/*/locations/*/certificateAuthorities/*}" + body: "certificate_authority" + }; + option (google.api.method_signature) = "certificate_authority,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location + // for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + rpc CreateCertificateRevocationList(CreateCertificateRevocationListRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists" + body: "certificate_revocation_list" + }; + option (google.api.method_signature) = "parent,certificate_revocation_list,certificate_revocation_list_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateRevocationList" + metadata_type: "OperationMetadata" + }; + } + + // Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc GetCertificateRevocationList(GetCertificateRevocationListRequest) returns (CertificateRevocationList) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc ListCertificateRevocationLists(ListCertificateRevocationListsRequest) returns (ListCertificateRevocationListsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + rpc UpdateCertificateRevocationList(UpdateCertificateRevocationListRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{certificate_revocation_list.name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}" + body: "certificate_revocation_list" + }; + option (google.api.method_signature) = "certificate_revocation_list,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateRevocationList" + metadata_type: "OperationMetadata" + }; + } + + // Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location. + rpc CreateReusableConfig(CreateReusableConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs" + body: "reusable_config" + }; + option (google.api.method_signature) = "parent,reusable_config,reusable_config_id"; + option (google.longrunning.operation_info) = { + response_type: "ReusableConfig" + metadata_type: "OperationMetadata" + }; + } + + // DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc DeleteReusableConfig(DeleteReusableConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.security.privateca.v1beta1.OperationMetadata" + }; + } + + // Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc GetReusableConfig(GetReusableConfigRequest) returns (ReusableConfig) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc ListReusableConfigs(ListReusableConfigsRequest) returns (ListReusableConfigsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. + rpc UpdateReusableConfig(UpdateReusableConfigRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{reusable_config.name=projects/*/locations/*/reusableConfigs/*}" + body: "reusable_config" + }; + option (google.api.method_signature) = "reusable_config,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "ReusableConfig" + metadata_type: "OperationMetadata" + }; + } +} + +// Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate]. +message CreateCertificateRequest { + // Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format + // `projects/*/locations/*/certificateAuthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], + // but is optional and its value is ignored otherwise. + string certificate_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values. + Certificate certificate = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate]. +message GetCertificateRequest { + // Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; +} + +// Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates]. +message ListCertificatesRequest { + // Required. The resource name of the location associated with the + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format + // `projects/*/locations/*/certificateauthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. Limit on the number of + // [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the + // response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained + // by including the + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates]. +message ListCertificatesResponse { + // The list of [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. + repeated Certificate certificates = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificatesRequest.next_page_token][] to retrieve the + // next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate]. +message RevokeCertificateRequest { + // Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the + // format `projects/*/locations/*/certificateAuthorities/*/certificates/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; + + // Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate. + RevocationReason reason = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate]. +message UpdateCertificateRequest { + // Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values. + Certificate certificate = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority]. +message ActivateCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. The signed CA certificate issued from + // [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr]. + string pem_ca_certificate = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Must include information about the issuer of 'pem_ca_certificate', and any + // further issuers until the self-signed CA. + SubordinateConfig subordinate_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority]. +message CreateCertificateAuthorityRequest { + // Required. The resource name of the location associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9-]{1,63}` + string certificate_authority_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values. + CertificateAuthority certificate_authority = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority]. +message DisableCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority]. +message EnableCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. +message FetchCertificateAuthorityCsrRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; +} + +// Response message for +// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. +message FetchCertificateAuthorityCsrResponse { + // Output only. The PEM-encoded signed certificate signing request (CSR). + string pem_csr = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority]. +message GetCertificateAuthorityRequest { + // Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + // get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities]. +message ListCertificateAuthoritiesRequest { + // Required. The resource name of the location associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + // include in the response. + // Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be + // obtained by including the + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities]. +message ListCertificateAuthoritiesResponse { + // The list of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority]. + repeated CertificateAuthority certificate_authorities = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next + // page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.RestoreCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority]. +message RestoreCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.ScheduleDeleteCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority]. +message ScheduleDeleteCertificateAuthorityRequest { + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + // format `projects/*/locations/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority]. +message UpdateCertificateAuthorityRequest { + // Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values. + CertificateAuthority certificate_authority = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationList]. +message CreateCertificateRevocationListRequest { + // Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + // associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format + // `projects/*/locations/*/certificateAuthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. It must be unique within a location and match the regular expression + // `[a-zA-Z0-9-]{1,63}` + string certificate_revocation_list_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values. + CertificateRevocationList certificate_revocation_list = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList]. +message GetCertificateRevocationListRequest { + // Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the + // [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateRevocationList" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists]. +message ListCertificateRevocationListsRequest { + // Required. The resource name of the location associated with the + // [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format + // `projects/*/locations/*/certificateauthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. Limit on the number of + // [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the + // response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + // can subsequently be obtained by including the + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists]. +message ListCertificateRevocationListsResponse { + // The list of [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. + repeated CertificateRevocationList certificate_revocation_lists = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the + // next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList]. +message UpdateCertificateRevocationListRequest { + // Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values. + CertificateRevocationList certificate_revocation_list = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfig]. +message CreateReusableConfigRequest { + // Required. The resource name of the location associated with the + // [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9-]{1,63}` + string reusable_config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values. + ReusableConfig reusable_config = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DeleteReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfig]. +message DeleteReusableConfigRequest { + // Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format + // `projects/*/locations/*/reusableConfigs/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/ReusableConfig" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig]. +message GetReusableConfigRequest { + // Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/ReusableConfig" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs]. +message ListReusableConfigsRequest { + // Required. The resource name of the location associated with the + // [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Limit on the number of + // [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response. + // Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be + // obtained by including the + // [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If + // unspecified, the server will pick an appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListReusableConfigs][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs]. +message ListReusableConfigsResponse { + // The list of [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig]. + repeated ReusableConfig reusable_configs = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListReusableConfigsRequest.next_page_token][] to retrieve + // the next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UpdateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfig]. +message UpdateReusableConfigRequest { + // Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values. + ReusableConfig reusable_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts new file mode 100644 index 00000000000..2c32e0b7391 --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -0,0 +1,13274 @@ +// 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 security. */ + namespace security { + + /** Namespace privateca. */ + namespace privateca { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Properties of a CertificateAuthority. */ + interface ICertificateAuthority { + + /** CertificateAuthority name */ + name?: (string|null); + + /** CertificateAuthority type */ + type?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|null); + + /** CertificateAuthority tier */ + tier?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|null); + + /** CertificateAuthority config */ + config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + + /** CertificateAuthority lifetime */ + lifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthority keySpec */ + keySpec?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null); + + /** CertificateAuthority certificatePolicy */ + certificatePolicy?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null); + + /** CertificateAuthority issuingOptions */ + issuingOptions?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null); + + /** CertificateAuthority subordinateConfig */ + subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + + /** CertificateAuthority state */ + state?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.State|null); + + /** CertificateAuthority pemCaCertificates */ + pemCaCertificates?: (string[]|null); + + /** CertificateAuthority caCertificateDescriptions */ + caCertificateDescriptions?: (google.cloud.security.privateca.v1beta1.ICertificateDescription[]|null); + + /** CertificateAuthority gcsBucket */ + gcsBucket?: (string|null); + + /** CertificateAuthority accessUrls */ + accessUrls?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null); + + /** CertificateAuthority createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a CertificateAuthority. */ + class CertificateAuthority implements ICertificateAuthority { + + /** + * Constructs a new CertificateAuthority. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificateAuthority); + + /** CertificateAuthority name. */ + public name: string; + + /** CertificateAuthority type. */ + public type: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Type); + + /** CertificateAuthority tier. */ + public tier: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier); + + /** CertificateAuthority config. */ + public config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + + /** CertificateAuthority lifetime. */ + public lifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthority keySpec. */ + public keySpec?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null); + + /** CertificateAuthority certificatePolicy. */ + public certificatePolicy?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null); + + /** CertificateAuthority issuingOptions. */ + public issuingOptions?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null); + + /** CertificateAuthority subordinateConfig. */ + public subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + + /** CertificateAuthority state. */ + public state: (google.cloud.security.privateca.v1beta1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.State); + + /** CertificateAuthority pemCaCertificates. */ + public pemCaCertificates: string[]; + + /** CertificateAuthority caCertificateDescriptions. */ + public caCertificateDescriptions: google.cloud.security.privateca.v1beta1.ICertificateDescription[]; + + /** CertificateAuthority gcsBucket. */ + public gcsBucket: string; + + /** CertificateAuthority accessUrls. */ + public accessUrls?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null); + + /** CertificateAuthority createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new CertificateAuthority instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateAuthority instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificateAuthority): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @param message CertificateAuthority message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @param message CertificateAuthority message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Verifies a CertificateAuthority message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateAuthority message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateAuthority + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Creates a plain object from a CertificateAuthority message. Also converts values to other types if specified. + * @param message CertificateAuthority + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateAuthority to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateAuthority { + + /** Properties of an IssuingOptions. */ + interface IIssuingOptions { + + /** IssuingOptions includeCaCertUrl */ + includeCaCertUrl?: (boolean|null); + + /** IssuingOptions includeCrlAccessUrl */ + includeCrlAccessUrl?: (boolean|null); + } + + /** Represents an IssuingOptions. */ + class IssuingOptions implements IIssuingOptions { + + /** + * Constructs a new IssuingOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions); + + /** IssuingOptions includeCaCertUrl. */ + public includeCaCertUrl: boolean; + + /** IssuingOptions includeCrlAccessUrl. */ + public includeCrlAccessUrl: boolean; + + /** + * Creates a new IssuingOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns IssuingOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Encodes the specified IssuingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @param message IssuingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssuingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @param message IssuingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Verifies an IssuingOptions message. + * @param message Plain 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 IssuingOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssuingOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Creates a plain object from an IssuingOptions message. Also converts values to other types if specified. + * @param message IssuingOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssuingOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertificateAuthorityPolicy. */ + interface ICertificateAuthorityPolicy { + + /** CertificateAuthorityPolicy allowedConfigList */ + allowedConfigList?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null); + + /** CertificateAuthorityPolicy overwriteConfigValues */ + overwriteConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); + + /** CertificateAuthorityPolicy allowedLocationsAndOrganizations */ + allowedLocationsAndOrganizations?: (google.cloud.security.privateca.v1beta1.ISubject[]|null); + + /** CertificateAuthorityPolicy allowedCommonNames */ + allowedCommonNames?: (string[]|null); + + /** CertificateAuthorityPolicy allowedSans */ + allowedSans?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null); + + /** CertificateAuthorityPolicy maximumLifetime */ + maximumLifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthorityPolicy allowedIssuanceModes */ + allowedIssuanceModes?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null); + } + + /** Represents a CertificateAuthorityPolicy. */ + class CertificateAuthorityPolicy implements ICertificateAuthorityPolicy { + + /** + * Constructs a new CertificateAuthorityPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy); + + /** CertificateAuthorityPolicy allowedConfigList. */ + public allowedConfigList?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null); + + /** CertificateAuthorityPolicy overwriteConfigValues. */ + public overwriteConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); + + /** CertificateAuthorityPolicy allowedLocationsAndOrganizations. */ + public allowedLocationsAndOrganizations: google.cloud.security.privateca.v1beta1.ISubject[]; + + /** CertificateAuthorityPolicy allowedCommonNames. */ + public allowedCommonNames: string[]; + + /** CertificateAuthorityPolicy allowedSans. */ + public allowedSans?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null); + + /** CertificateAuthorityPolicy maximumLifetime. */ + public maximumLifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthorityPolicy allowedIssuanceModes. */ + public allowedIssuanceModes?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null); + + /** CertificateAuthorityPolicy configPolicy. */ + public configPolicy?: ("allowedConfigList"|"overwriteConfigValues"); + + /** + * Creates a new CertificateAuthorityPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateAuthorityPolicy instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Encodes the specified CertificateAuthorityPolicy message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @param message CertificateAuthorityPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateAuthorityPolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @param message CertificateAuthorityPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateAuthorityPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateAuthorityPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Verifies a CertificateAuthorityPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateAuthorityPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateAuthorityPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Creates a plain object from a CertificateAuthorityPolicy message. Also converts values to other types if specified. + * @param message CertificateAuthorityPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateAuthorityPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateAuthorityPolicy { + + /** Properties of an AllowedConfigList. */ + interface IAllowedConfigList { + + /** AllowedConfigList allowedConfigValues */ + allowedConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper[]|null); + } + + /** Represents an AllowedConfigList. */ + class AllowedConfigList implements IAllowedConfigList { + + /** + * Constructs a new AllowedConfigList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList); + + /** AllowedConfigList allowedConfigValues. */ + public allowedConfigValues: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper[]; + + /** + * Creates a new AllowedConfigList instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedConfigList instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList; + + /** + * Encodes the specified AllowedConfigList message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify|verify} messages. + * @param message AllowedConfigList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedConfigList message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify|verify} messages. + * @param message AllowedConfigList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedConfigList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedConfigList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList; + + /** + * Decodes an AllowedConfigList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedConfigList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList; + + /** + * Verifies an AllowedConfigList message. + * @param message Plain 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 AllowedConfigList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedConfigList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList; + + /** + * Creates a plain object from an AllowedConfigList message. Also converts values to other types if specified. + * @param message AllowedConfigList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedConfigList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AllowedSubjectAltNames. */ + interface IAllowedSubjectAltNames { + + /** AllowedSubjectAltNames allowedDnsNames */ + allowedDnsNames?: (string[]|null); + + /** AllowedSubjectAltNames allowedUris */ + allowedUris?: (string[]|null); + + /** AllowedSubjectAltNames allowedEmailAddresses */ + allowedEmailAddresses?: (string[]|null); + + /** AllowedSubjectAltNames allowedIps */ + allowedIps?: (string[]|null); + + /** AllowedSubjectAltNames allowGlobbingDnsWildcards */ + allowGlobbingDnsWildcards?: (boolean|null); + + /** AllowedSubjectAltNames allowCustomSans */ + allowCustomSans?: (boolean|null); + } + + /** Represents an AllowedSubjectAltNames. */ + class AllowedSubjectAltNames implements IAllowedSubjectAltNames { + + /** + * Constructs a new AllowedSubjectAltNames. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames); + + /** AllowedSubjectAltNames allowedDnsNames. */ + public allowedDnsNames: string[]; + + /** AllowedSubjectAltNames allowedUris. */ + public allowedUris: string[]; + + /** AllowedSubjectAltNames allowedEmailAddresses. */ + public allowedEmailAddresses: string[]; + + /** AllowedSubjectAltNames allowedIps. */ + public allowedIps: string[]; + + /** AllowedSubjectAltNames allowGlobbingDnsWildcards. */ + public allowGlobbingDnsWildcards: boolean; + + /** AllowedSubjectAltNames allowCustomSans. */ + public allowCustomSans: boolean; + + /** + * Creates a new AllowedSubjectAltNames instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedSubjectAltNames instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames; + + /** + * Encodes the specified AllowedSubjectAltNames message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.verify|verify} messages. + * @param message AllowedSubjectAltNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedSubjectAltNames message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.verify|verify} messages. + * @param message AllowedSubjectAltNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedSubjectAltNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedSubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames; + + /** + * Decodes an AllowedSubjectAltNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedSubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames; + + /** + * Verifies an AllowedSubjectAltNames message. + * @param message Plain 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 AllowedSubjectAltNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedSubjectAltNames + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames; + + /** + * Creates a plain object from an AllowedSubjectAltNames message. Also converts values to other types if specified. + * @param message AllowedSubjectAltNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedSubjectAltNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an IssuanceModes. */ + interface IIssuanceModes { + + /** IssuanceModes allowCsrBasedIssuance */ + allowCsrBasedIssuance?: (boolean|null); + + /** IssuanceModes allowConfigBasedIssuance */ + allowConfigBasedIssuance?: (boolean|null); + } + + /** Represents an IssuanceModes. */ + class IssuanceModes implements IIssuanceModes { + + /** + * Constructs a new IssuanceModes. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes); + + /** IssuanceModes allowCsrBasedIssuance. */ + public allowCsrBasedIssuance: boolean; + + /** IssuanceModes allowConfigBasedIssuance. */ + public allowConfigBasedIssuance: boolean; + + /** + * Creates a new IssuanceModes instance using the specified properties. + * @param [properties] Properties to set + * @returns IssuanceModes instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes; + + /** + * Encodes the specified IssuanceModes message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.verify|verify} messages. + * @param message IssuanceModes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssuanceModes message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.verify|verify} messages. + * @param message IssuanceModes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes; + + /** + * Verifies an IssuanceModes message. + * @param message Plain 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 IssuanceModes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssuanceModes + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes; + + /** + * Creates a plain object from an IssuanceModes message. Also converts values to other types if specified. + * @param message IssuanceModes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssuanceModes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an AccessUrls. */ + interface IAccessUrls { + + /** AccessUrls caCertificateAccessUrl */ + caCertificateAccessUrl?: (string|null); + + /** AccessUrls crlAccessUrl */ + crlAccessUrl?: (string|null); + } + + /** Represents an AccessUrls. */ + class AccessUrls implements IAccessUrls { + + /** + * Constructs a new AccessUrls. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls); + + /** AccessUrls caCertificateAccessUrl. */ + public caCertificateAccessUrl: string; + + /** AccessUrls crlAccessUrl. */ + public crlAccessUrl: string; + + /** + * Creates a new AccessUrls instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessUrls instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls): google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls; + + /** + * Encodes the specified AccessUrls message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify|verify} messages. + * @param message AccessUrls message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessUrls message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify|verify} messages. + * @param message AccessUrls message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessUrls message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessUrls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls; + + /** + * Decodes an AccessUrls message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessUrls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls; + + /** + * Verifies an AccessUrls message. + * @param message Plain 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 AccessUrls message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessUrls + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls; + + /** + * Creates a plain object from an AccessUrls message. Also converts values to other types if specified. + * @param message AccessUrls + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessUrls to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyVersionSpec. */ + interface IKeyVersionSpec { + + /** KeyVersionSpec cloudKmsKeyVersion */ + cloudKmsKeyVersion?: (string|null); + + /** KeyVersionSpec algorithm */ + algorithm?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|null); + } + + /** Represents a KeyVersionSpec. */ + class KeyVersionSpec implements IKeyVersionSpec { + + /** + * Constructs a new KeyVersionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec); + + /** KeyVersionSpec cloudKmsKeyVersion. */ + public cloudKmsKeyVersion: string; + + /** KeyVersionSpec algorithm. */ + public algorithm: (google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm); + + /** KeyVersionSpec KeyVersion. */ + public KeyVersion?: ("cloudKmsKeyVersion"|"algorithm"); + + /** + * Creates a new KeyVersionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyVersionSpec instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec): google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec; + + /** + * Encodes the specified KeyVersionSpec message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @param message KeyVersionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyVersionSpec message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @param message KeyVersionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyVersionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyVersionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec; + + /** + * Decodes a KeyVersionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyVersionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec; + + /** + * Verifies a KeyVersionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyVersionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyVersionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec; + + /** + * Creates a plain object from a KeyVersionSpec message. Also converts values to other types if specified. + * @param message KeyVersionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyVersionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SELF_SIGNED = 1, + SUBORDINATE = 2 + } + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + ENTERPRISE = 1, + DEVOPS = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + PENDING_ACTIVATION = 3, + PENDING_DELETION = 4 + } + + /** SignHashAlgorithm enum. */ + enum SignHashAlgorithm { + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0, + RSA_PSS_2048_SHA_256 = 1, + RSA_PSS_3072_SHA_256 = 2, + RSA_PSS_4096_SHA_256 = 3, + EC_P256_SHA256 = 4, + EC_P384_SHA384 = 5 + } + } + + /** Properties of a CertificateRevocationList. */ + interface ICertificateRevocationList { + + /** CertificateRevocationList name */ + name?: (string|null); + + /** CertificateRevocationList sequenceNumber */ + sequenceNumber?: (number|Long|string|null); + + /** CertificateRevocationList revokedCertificates */ + revokedCertificates?: (google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate[]|null); + + /** CertificateRevocationList pemCrl */ + pemCrl?: (string|null); + + /** CertificateRevocationList accessUrl */ + accessUrl?: (string|null); + + /** CertificateRevocationList state */ + state?: (google.cloud.security.privateca.v1beta1.CertificateRevocationList.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateRevocationList.State|null); + + /** CertificateRevocationList createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a CertificateRevocationList. */ + class CertificateRevocationList implements ICertificateRevocationList { + + /** + * Constructs a new CertificateRevocationList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificateRevocationList); + + /** CertificateRevocationList name. */ + public name: string; + + /** CertificateRevocationList sequenceNumber. */ + public sequenceNumber: (number|Long|string); + + /** CertificateRevocationList revokedCertificates. */ + public revokedCertificates: google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate[]; + + /** CertificateRevocationList pemCrl. */ + public pemCrl: string; + + /** CertificateRevocationList accessUrl. */ + public accessUrl: string; + + /** CertificateRevocationList state. */ + public state: (google.cloud.security.privateca.v1beta1.CertificateRevocationList.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateRevocationList.State); + + /** CertificateRevocationList createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new CertificateRevocationList instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateRevocationList instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificateRevocationList): google.cloud.security.privateca.v1beta1.CertificateRevocationList; + + /** + * Encodes the specified CertificateRevocationList message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify|verify} messages. + * @param message CertificateRevocationList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICertificateRevocationList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateRevocationList message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify|verify} messages. + * @param message CertificateRevocationList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificateRevocationList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateRevocationList; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateRevocationList; + + /** + * Verifies a CertificateRevocationList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateRevocationList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateRevocationList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateRevocationList; + + /** + * Creates a plain object from a CertificateRevocationList message. Also converts values to other types if specified. + * @param message CertificateRevocationList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateRevocationList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateRevocationList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateRevocationList { + + /** Properties of a RevokedCertificate. */ + interface IRevokedCertificate { + + /** RevokedCertificate certificate */ + certificate?: (string|null); + + /** RevokedCertificate hexSerialNumber */ + hexSerialNumber?: (string|null); + + /** RevokedCertificate revocationReason */ + revocationReason?: (google.cloud.security.privateca.v1beta1.RevocationReason|keyof typeof google.cloud.security.privateca.v1beta1.RevocationReason|null); + } + + /** Represents a RevokedCertificate. */ + class RevokedCertificate implements IRevokedCertificate { + + /** + * Constructs a new RevokedCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate); + + /** RevokedCertificate certificate. */ + public certificate: string; + + /** RevokedCertificate hexSerialNumber. */ + public hexSerialNumber: string; + + /** RevokedCertificate revocationReason. */ + public revocationReason: (google.cloud.security.privateca.v1beta1.RevocationReason|keyof typeof google.cloud.security.privateca.v1beta1.RevocationReason); + + /** + * Creates a new RevokedCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns RevokedCertificate instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate): google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate; + + /** + * Encodes the specified RevokedCertificate message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @param message RevokedCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevokedCertificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @param message RevokedCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate; + + /** + * Verifies a RevokedCertificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevokedCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevokedCertificate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate; + + /** + * Creates a plain object from a RevokedCertificate message. Also converts values to other types if specified. + * @param message RevokedCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevokedCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + SUPERSEDED = 2 + } + } + + /** Properties of a Certificate. */ + interface ICertificate { + + /** Certificate name */ + name?: (string|null); + + /** Certificate pemCsr */ + pemCsr?: (string|null); + + /** Certificate config */ + config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + + /** Certificate lifetime */ + lifetime?: (google.protobuf.IDuration|null); + + /** Certificate revocationDetails */ + revocationDetails?: (google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails|null); + + /** Certificate pemCertificate */ + pemCertificate?: (string|null); + + /** Certificate certificateDescription */ + certificateDescription?: (google.cloud.security.privateca.v1beta1.ICertificateDescription|null); + + /** Certificate pemCertificateChain */ + pemCertificateChain?: (string[]|null); + + /** Certificate createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Certificate updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Certificate labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Certificate. */ + class Certificate implements ICertificate { + + /** + * Constructs a new Certificate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificate); + + /** Certificate name. */ + public name: string; + + /** Certificate pemCsr. */ + public pemCsr: string; + + /** Certificate config. */ + public config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + + /** Certificate lifetime. */ + public lifetime?: (google.protobuf.IDuration|null); + + /** Certificate revocationDetails. */ + public revocationDetails?: (google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails|null); + + /** Certificate pemCertificate. */ + public pemCertificate: string; + + /** Certificate certificateDescription. */ + public certificateDescription?: (google.cloud.security.privateca.v1beta1.ICertificateDescription|null); + + /** Certificate pemCertificateChain. */ + public pemCertificateChain: string[]; + + /** Certificate createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Certificate updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Certificate labels. */ + public labels: { [k: string]: string }; + + /** Certificate certificateConfig. */ + public certificateConfig?: ("pemCsr"|"config"); + + /** + * Creates a new Certificate instance using the specified properties. + * @param [properties] Properties to set + * @returns Certificate instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificate): google.cloud.security.privateca.v1beta1.Certificate; + + /** + * Encodes the specified Certificate message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.verify|verify} messages. + * @param message Certificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Certificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.verify|verify} messages. + * @param message Certificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Certificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.Certificate; + + /** + * Decodes a Certificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.Certificate; + + /** + * Verifies a Certificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Certificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Certificate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.Certificate; + + /** + * Creates a plain object from a Certificate message. Also converts values to other types if specified. + * @param message Certificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.Certificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Certificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Certificate { + + /** Properties of a RevocationDetails. */ + interface IRevocationDetails { + + /** RevocationDetails revocationState */ + revocationState?: (google.cloud.security.privateca.v1beta1.RevocationReason|keyof typeof google.cloud.security.privateca.v1beta1.RevocationReason|null); + + /** RevocationDetails revocationTime */ + revocationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RevocationDetails. */ + class RevocationDetails implements IRevocationDetails { + + /** + * Constructs a new RevocationDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails); + + /** RevocationDetails revocationState. */ + public revocationState: (google.cloud.security.privateca.v1beta1.RevocationReason|keyof typeof google.cloud.security.privateca.v1beta1.RevocationReason); + + /** RevocationDetails revocationTime. */ + public revocationTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RevocationDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns RevocationDetails instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails): google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails; + + /** + * Encodes the specified RevocationDetails message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.verify|verify} messages. + * @param message RevocationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevocationDetails message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.verify|verify} messages. + * @param message RevocationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails; + + /** + * Verifies a RevocationDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevocationDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevocationDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails; + + /** + * Creates a plain object from a RevocationDetails message. Also converts values to other types if specified. + * @param message RevocationDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevocationDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ReusableConfig. */ + interface IReusableConfig { + + /** ReusableConfig name */ + name?: (string|null); + + /** ReusableConfig values */ + values?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); + + /** ReusableConfig description */ + description?: (string|null); + + /** ReusableConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ReusableConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** ReusableConfig labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a ReusableConfig. */ + class ReusableConfig implements IReusableConfig { + + /** + * Constructs a new ReusableConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IReusableConfig); + + /** ReusableConfig name. */ + public name: string; + + /** ReusableConfig values. */ + public values?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); + + /** ReusableConfig description. */ + public description: string; + + /** ReusableConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ReusableConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** ReusableConfig labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new ReusableConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReusableConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IReusableConfig): google.cloud.security.privateca.v1beta1.ReusableConfig; + + /** + * Encodes the specified ReusableConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfig.verify|verify} messages. + * @param message ReusableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IReusableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReusableConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfig.verify|verify} messages. + * @param message ReusableConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IReusableConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReusableConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReusableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ReusableConfig; + + /** + * Decodes a ReusableConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReusableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ReusableConfig; + + /** + * Verifies a ReusableConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReusableConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReusableConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ReusableConfig; + + /** + * Creates a plain object from a ReusableConfig message. Also converts values to other types if specified. + * @param message ReusableConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ReusableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReusableConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReusableConfigValues. */ + interface IReusableConfigValues { + + /** ReusableConfigValues keyUsage */ + keyUsage?: (google.cloud.security.privateca.v1beta1.IKeyUsage|null); + + /** ReusableConfigValues caOptions */ + caOptions?: (google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions|null); + + /** ReusableConfigValues policyIds */ + policyIds?: (google.cloud.security.privateca.v1beta1.IObjectId[]|null); + + /** ReusableConfigValues aiaOcspServers */ + aiaOcspServers?: (string[]|null); + + /** ReusableConfigValues additionalExtensions */ + additionalExtensions?: (google.cloud.security.privateca.v1beta1.IX509Extension[]|null); + } + + /** Represents a ReusableConfigValues. */ + class ReusableConfigValues implements IReusableConfigValues { + + /** + * Constructs a new ReusableConfigValues. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IReusableConfigValues); + + /** ReusableConfigValues keyUsage. */ + public keyUsage?: (google.cloud.security.privateca.v1beta1.IKeyUsage|null); + + /** ReusableConfigValues caOptions. */ + public caOptions?: (google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions|null); + + /** ReusableConfigValues policyIds. */ + public policyIds: google.cloud.security.privateca.v1beta1.IObjectId[]; + + /** ReusableConfigValues aiaOcspServers. */ + public aiaOcspServers: string[]; + + /** ReusableConfigValues additionalExtensions. */ + public additionalExtensions: google.cloud.security.privateca.v1beta1.IX509Extension[]; + + /** + * Creates a new ReusableConfigValues instance using the specified properties. + * @param [properties] Properties to set + * @returns ReusableConfigValues instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IReusableConfigValues): google.cloud.security.privateca.v1beta1.ReusableConfigValues; + + /** + * Encodes the specified ReusableConfigValues message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify|verify} messages. + * @param message ReusableConfigValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IReusableConfigValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReusableConfigValues message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify|verify} messages. + * @param message ReusableConfigValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IReusableConfigValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReusableConfigValues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReusableConfigValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ReusableConfigValues; + + /** + * Decodes a ReusableConfigValues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReusableConfigValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ReusableConfigValues; + + /** + * Verifies a ReusableConfigValues message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReusableConfigValues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReusableConfigValues + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ReusableConfigValues; + + /** + * Creates a plain object from a ReusableConfigValues message. Also converts values to other types if specified. + * @param message ReusableConfigValues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ReusableConfigValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReusableConfigValues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ReusableConfigValues { + + /** Properties of a CaOptions. */ + interface ICaOptions { + + /** CaOptions isCa */ + isCa?: (google.protobuf.IBoolValue|null); + + /** CaOptions maxIssuerPathLength */ + maxIssuerPathLength?: (google.protobuf.IInt32Value|null); + } + + /** Represents a CaOptions. */ + class CaOptions implements ICaOptions { + + /** + * Constructs a new CaOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions); + + /** CaOptions isCa. */ + public isCa?: (google.protobuf.IBoolValue|null); + + /** CaOptions maxIssuerPathLength. */ + public maxIssuerPathLength?: (google.protobuf.IInt32Value|null); + + /** + * Creates a new CaOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CaOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions): google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions; + + /** + * Encodes the specified CaOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.verify|verify} messages. + * @param message CaOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.verify|verify} messages. + * @param message CaOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions; + + /** + * Decodes a CaOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions; + + /** + * Verifies a CaOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CaOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions; + + /** + * Creates a plain object from a CaOptions message. Also converts values to other types if specified. + * @param message CaOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a ReusableConfigWrapper. */ + interface IReusableConfigWrapper { + + /** ReusableConfigWrapper reusableConfig */ + reusableConfig?: (string|null); + + /** ReusableConfigWrapper reusableConfigValues */ + reusableConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); + } + + /** Represents a ReusableConfigWrapper. */ + class ReusableConfigWrapper implements IReusableConfigWrapper { + + /** + * Constructs a new ReusableConfigWrapper. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper); + + /** ReusableConfigWrapper reusableConfig. */ + public reusableConfig: string; + + /** ReusableConfigWrapper reusableConfigValues. */ + public reusableConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); + + /** ReusableConfigWrapper configValues. */ + public configValues?: ("reusableConfig"|"reusableConfigValues"); + + /** + * Creates a new ReusableConfigWrapper instance using the specified properties. + * @param [properties] Properties to set + * @returns ReusableConfigWrapper instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper): google.cloud.security.privateca.v1beta1.ReusableConfigWrapper; + + /** + * Encodes the specified ReusableConfigWrapper message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify|verify} messages. + * @param message ReusableConfigWrapper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReusableConfigWrapper message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify|verify} messages. + * @param message ReusableConfigWrapper message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReusableConfigWrapper message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReusableConfigWrapper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ReusableConfigWrapper; + + /** + * Decodes a ReusableConfigWrapper message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReusableConfigWrapper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ReusableConfigWrapper; + + /** + * Verifies a ReusableConfigWrapper message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReusableConfigWrapper message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReusableConfigWrapper + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ReusableConfigWrapper; + + /** + * Creates a plain object from a ReusableConfigWrapper message. Also converts values to other types if specified. + * @param message ReusableConfigWrapper + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ReusableConfigWrapper, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReusableConfigWrapper to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SubordinateConfig. */ + interface ISubordinateConfig { + + /** SubordinateConfig certificateAuthority */ + certificateAuthority?: (string|null); + + /** SubordinateConfig pemIssuerChain */ + pemIssuerChain?: (google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain|null); + } + + /** Represents a SubordinateConfig. */ + class SubordinateConfig implements ISubordinateConfig { + + /** + * Constructs a new SubordinateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ISubordinateConfig); + + /** SubordinateConfig certificateAuthority. */ + public certificateAuthority: string; + + /** SubordinateConfig pemIssuerChain. */ + public pemIssuerChain?: (google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain|null); + + /** SubordinateConfig subordinateConfig. */ + public subordinateConfig?: ("certificateAuthority"|"pemIssuerChain"); + + /** + * Creates a new SubordinateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SubordinateConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ISubordinateConfig): google.cloud.security.privateca.v1beta1.SubordinateConfig; + + /** + * Encodes the specified SubordinateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.verify|verify} messages. + * @param message SubordinateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ISubordinateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubordinateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.verify|verify} messages. + * @param message SubordinateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ISubordinateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.SubordinateConfig; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.SubordinateConfig; + + /** + * Verifies a SubordinateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubordinateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubordinateConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.SubordinateConfig; + + /** + * Creates a plain object from a SubordinateConfig message. Also converts values to other types if specified. + * @param message SubordinateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.SubordinateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubordinateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SubordinateConfig { + + /** Properties of a SubordinateConfigChain. */ + interface ISubordinateConfigChain { + + /** SubordinateConfigChain pemCertificates */ + pemCertificates?: (string[]|null); + } + + /** Represents a SubordinateConfigChain. */ + class SubordinateConfigChain implements ISubordinateConfigChain { + + /** + * Constructs a new SubordinateConfigChain. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain); + + /** SubordinateConfigChain pemCertificates. */ + public pemCertificates: string[]; + + /** + * Creates a new SubordinateConfigChain instance using the specified properties. + * @param [properties] Properties to set + * @returns SubordinateConfigChain instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain): google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain; + + /** + * Encodes the specified SubordinateConfigChain message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @param message SubordinateConfigChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubordinateConfigChain message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @param message SubordinateConfigChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain; + + /** + * Verifies a SubordinateConfigChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubordinateConfigChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubordinateConfigChain + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain; + + /** + * Creates a plain object from a SubordinateConfigChain message. Also converts values to other types if specified. + * @param message SubordinateConfigChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubordinateConfigChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a PublicKey. */ + interface IPublicKey { + + /** PublicKey type */ + type?: (google.cloud.security.privateca.v1beta1.PublicKey.KeyType|keyof typeof google.cloud.security.privateca.v1beta1.PublicKey.KeyType|null); + + /** PublicKey key */ + key?: (Uint8Array|string|null); + } + + /** Represents a PublicKey. */ + class PublicKey implements IPublicKey { + + /** + * Constructs a new PublicKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IPublicKey); + + /** PublicKey type. */ + public type: (google.cloud.security.privateca.v1beta1.PublicKey.KeyType|keyof typeof google.cloud.security.privateca.v1beta1.PublicKey.KeyType); + + /** PublicKey key. */ + public key: (Uint8Array|string); + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IPublicKey): google.cloud.security.privateca.v1beta1.PublicKey; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.PublicKey; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.PublicKey; + + /** + * Verifies a PublicKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.PublicKey; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @param message PublicKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PublicKey { + + /** KeyType enum. */ + enum KeyType { + KEY_TYPE_UNSPECIFIED = 0, + PEM_RSA_KEY = 1, + PEM_EC_KEY = 2 + } + } + + /** Properties of a CertificateConfig. */ + interface ICertificateConfig { + + /** CertificateConfig subjectConfig */ + subjectConfig?: (google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig|null); + + /** CertificateConfig reusableConfig */ + reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); + + /** CertificateConfig publicKey */ + publicKey?: (google.cloud.security.privateca.v1beta1.IPublicKey|null); + } + + /** Represents a CertificateConfig. */ + class CertificateConfig implements ICertificateConfig { + + /** + * Constructs a new CertificateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificateConfig); + + /** CertificateConfig subjectConfig. */ + public subjectConfig?: (google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig|null); + + /** CertificateConfig reusableConfig. */ + public reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); + + /** CertificateConfig publicKey. */ + public publicKey?: (google.cloud.security.privateca.v1beta1.IPublicKey|null); + + /** + * Creates a new CertificateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificateConfig): google.cloud.security.privateca.v1beta1.CertificateConfig; + + /** + * Encodes the specified CertificateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.verify|verify} messages. + * @param message CertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.verify|verify} messages. + * @param message CertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateConfig; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateConfig; + + /** + * Verifies a CertificateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateConfig; + + /** + * Creates a plain object from a CertificateConfig message. Also converts values to other types if specified. + * @param message CertificateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateConfig { + + /** Properties of a SubjectConfig. */ + interface ISubjectConfig { + + /** SubjectConfig subject */ + subject?: (google.cloud.security.privateca.v1beta1.ISubject|null); + + /** SubjectConfig commonName */ + commonName?: (string|null); + + /** SubjectConfig subjectAltName */ + subjectAltName?: (google.cloud.security.privateca.v1beta1.ISubjectAltNames|null); + } + + /** Represents a SubjectConfig. */ + class SubjectConfig implements ISubjectConfig { + + /** + * Constructs a new SubjectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig); + + /** SubjectConfig subject. */ + public subject?: (google.cloud.security.privateca.v1beta1.ISubject|null); + + /** SubjectConfig commonName. */ + public commonName: string; + + /** SubjectConfig subjectAltName. */ + public subjectAltName?: (google.cloud.security.privateca.v1beta1.ISubjectAltNames|null); + + /** + * Creates a new SubjectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SubjectConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig): google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig; + + /** + * Encodes the specified SubjectConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @param message SubjectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubjectConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @param message SubjectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig; + + /** + * Verifies a SubjectConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubjectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubjectConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig; + + /** + * Creates a plain object from a SubjectConfig message. Also converts values to other types if specified. + * @param message SubjectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubjectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a CertificateDescription. */ + interface ICertificateDescription { + + /** CertificateDescription subjectDescription */ + subjectDescription?: (google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription|null); + + /** CertificateDescription configValues */ + configValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); + + /** CertificateDescription publicKey */ + publicKey?: (google.cloud.security.privateca.v1beta1.IPublicKey|null); + + /** CertificateDescription subjectKeyId */ + subjectKeyId?: (google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null); + + /** CertificateDescription authorityKeyId */ + authorityKeyId?: (google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null); + + /** CertificateDescription crlDistributionPoints */ + crlDistributionPoints?: (string[]|null); + + /** CertificateDescription aiaIssuingCertificateUrls */ + aiaIssuingCertificateUrls?: (string[]|null); + + /** CertificateDescription certFingerprint */ + certFingerprint?: (google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint|null); + } + + /** Represents a CertificateDescription. */ + class CertificateDescription implements ICertificateDescription { + + /** + * Constructs a new CertificateDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificateDescription); + + /** CertificateDescription subjectDescription. */ + public subjectDescription?: (google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription|null); + + /** CertificateDescription configValues. */ + public configValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); + + /** CertificateDescription publicKey. */ + public publicKey?: (google.cloud.security.privateca.v1beta1.IPublicKey|null); + + /** CertificateDescription subjectKeyId. */ + public subjectKeyId?: (google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null); + + /** CertificateDescription authorityKeyId. */ + public authorityKeyId?: (google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null); + + /** CertificateDescription crlDistributionPoints. */ + public crlDistributionPoints: string[]; + + /** CertificateDescription aiaIssuingCertificateUrls. */ + public aiaIssuingCertificateUrls: string[]; + + /** CertificateDescription certFingerprint. */ + public certFingerprint?: (google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint|null); + + /** + * Creates a new CertificateDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateDescription instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificateDescription): google.cloud.security.privateca.v1beta1.CertificateDescription; + + /** + * Encodes the specified CertificateDescription message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.verify|verify} messages. + * @param message CertificateDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICertificateDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.verify|verify} messages. + * @param message CertificateDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificateDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateDescription; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateDescription; + + /** + * Verifies a CertificateDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateDescription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateDescription; + + /** + * Creates a plain object from a CertificateDescription message. Also converts values to other types if specified. + * @param message CertificateDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateDescription { + + /** Properties of a SubjectDescription. */ + interface ISubjectDescription { + + /** SubjectDescription subject */ + subject?: (google.cloud.security.privateca.v1beta1.ISubject|null); + + /** SubjectDescription commonName */ + commonName?: (string|null); + + /** SubjectDescription subjectAltName */ + subjectAltName?: (google.cloud.security.privateca.v1beta1.ISubjectAltNames|null); + + /** SubjectDescription hexSerialNumber */ + hexSerialNumber?: (string|null); + + /** SubjectDescription lifetime */ + lifetime?: (google.protobuf.IDuration|null); + + /** SubjectDescription notBeforeTime */ + notBeforeTime?: (google.protobuf.ITimestamp|null); + + /** SubjectDescription notAfterTime */ + notAfterTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SubjectDescription. */ + class SubjectDescription implements ISubjectDescription { + + /** + * Constructs a new SubjectDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription); + + /** SubjectDescription subject. */ + public subject?: (google.cloud.security.privateca.v1beta1.ISubject|null); + + /** SubjectDescription commonName. */ + public commonName: string; + + /** SubjectDescription subjectAltName. */ + public subjectAltName?: (google.cloud.security.privateca.v1beta1.ISubjectAltNames|null); + + /** SubjectDescription hexSerialNumber. */ + public hexSerialNumber: string; + + /** SubjectDescription lifetime. */ + public lifetime?: (google.protobuf.IDuration|null); + + /** SubjectDescription notBeforeTime. */ + public notBeforeTime?: (google.protobuf.ITimestamp|null); + + /** SubjectDescription notAfterTime. */ + public notAfterTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SubjectDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns SubjectDescription instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription): google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription; + + /** + * Encodes the specified SubjectDescription message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @param message SubjectDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubjectDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @param message SubjectDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription; + + /** + * Verifies a SubjectDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubjectDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubjectDescription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription; + + /** + * Creates a plain object from a SubjectDescription message. Also converts values to other types if specified. + * @param message SubjectDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubjectDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyId. */ + interface IKeyId { + + /** KeyId keyId */ + keyId?: (string|null); + } + + /** Represents a KeyId. */ + class KeyId implements IKeyId { + + /** + * Constructs a new KeyId. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId); + + /** KeyId keyId. */ + public keyId: string; + + /** + * Creates a new KeyId instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyId instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId): google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId; + + /** + * Verifies a KeyId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyId + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @param message KeyId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertificateFingerprint. */ + interface ICertificateFingerprint { + + /** CertificateFingerprint sha256Hash */ + sha256Hash?: (string|null); + } + + /** Represents a CertificateFingerprint. */ + class CertificateFingerprint implements ICertificateFingerprint { + + /** + * Constructs a new CertificateFingerprint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint); + + /** CertificateFingerprint sha256Hash. */ + public sha256Hash: string; + + /** + * Creates a new CertificateFingerprint instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateFingerprint instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint): google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint; + + /** + * Encodes the specified CertificateFingerprint message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @param message CertificateFingerprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateFingerprint message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @param message CertificateFingerprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint; + + /** + * Verifies a CertificateFingerprint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateFingerprint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateFingerprint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint; + + /** + * Creates a plain object from a CertificateFingerprint message. Also converts values to other types if specified. + * @param message CertificateFingerprint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateFingerprint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ObjectId. */ + interface IObjectId { + + /** ObjectId objectIdPath */ + objectIdPath?: (number[]|null); + } + + /** Represents an ObjectId. */ + class ObjectId implements IObjectId { + + /** + * Constructs a new ObjectId. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IObjectId); + + /** ObjectId objectIdPath. */ + public objectIdPath: number[]; + + /** + * Creates a new ObjectId instance using the specified properties. + * @param [properties] Properties to set + * @returns ObjectId instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IObjectId): google.cloud.security.privateca.v1beta1.ObjectId; + + /** + * Encodes the specified ObjectId message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ObjectId.verify|verify} messages. + * @param message ObjectId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IObjectId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ObjectId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ObjectId.verify|verify} messages. + * @param message ObjectId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IObjectId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ObjectId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ObjectId; + + /** + * Decodes an ObjectId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ObjectId; + + /** + * Verifies an ObjectId message. + * @param message Plain 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 ObjectId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ObjectId + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ObjectId; + + /** + * Creates a plain object from an ObjectId message. Also converts values to other types if specified. + * @param message ObjectId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ObjectId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ObjectId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a X509Extension. */ + interface IX509Extension { + + /** X509Extension objectId */ + objectId?: (google.cloud.security.privateca.v1beta1.IObjectId|null); + + /** X509Extension critical */ + critical?: (boolean|null); + + /** X509Extension value */ + value?: (Uint8Array|string|null); + } + + /** Represents a X509Extension. */ + class X509Extension implements IX509Extension { + + /** + * Constructs a new X509Extension. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IX509Extension); + + /** X509Extension objectId. */ + public objectId?: (google.cloud.security.privateca.v1beta1.IObjectId|null); + + /** X509Extension critical. */ + public critical: boolean; + + /** X509Extension value. */ + public value: (Uint8Array|string); + + /** + * Creates a new X509Extension instance using the specified properties. + * @param [properties] Properties to set + * @returns X509Extension instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IX509Extension): google.cloud.security.privateca.v1beta1.X509Extension; + + /** + * Encodes the specified X509Extension message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.X509Extension.verify|verify} messages. + * @param message X509Extension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IX509Extension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified X509Extension message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.X509Extension.verify|verify} messages. + * @param message X509Extension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IX509Extension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a X509Extension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.X509Extension; + + /** + * Decodes a X509Extension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.X509Extension; + + /** + * Verifies a X509Extension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a X509Extension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns X509Extension + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.X509Extension; + + /** + * Creates a plain object from a X509Extension message. Also converts values to other types if specified. + * @param message X509Extension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.X509Extension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this X509Extension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyUsage. */ + interface IKeyUsage { + + /** KeyUsage baseKeyUsage */ + baseKeyUsage?: (google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions|null); + + /** KeyUsage extendedKeyUsage */ + extendedKeyUsage?: (google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions|null); + + /** KeyUsage unknownExtendedKeyUsages */ + unknownExtendedKeyUsages?: (google.cloud.security.privateca.v1beta1.IObjectId[]|null); + } + + /** Represents a KeyUsage. */ + class KeyUsage implements IKeyUsage { + + /** + * Constructs a new KeyUsage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IKeyUsage); + + /** KeyUsage baseKeyUsage. */ + public baseKeyUsage?: (google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions|null); + + /** KeyUsage extendedKeyUsage. */ + public extendedKeyUsage?: (google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions|null); + + /** KeyUsage unknownExtendedKeyUsages. */ + public unknownExtendedKeyUsages: google.cloud.security.privateca.v1beta1.IObjectId[]; + + /** + * Creates a new KeyUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyUsage instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IKeyUsage): google.cloud.security.privateca.v1beta1.KeyUsage; + + /** + * Encodes the specified KeyUsage message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.verify|verify} messages. + * @param message KeyUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IKeyUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyUsage message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.verify|verify} messages. + * @param message KeyUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IKeyUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.KeyUsage; + + /** + * Decodes a KeyUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.KeyUsage; + + /** + * Verifies a KeyUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyUsage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.KeyUsage; + + /** + * Creates a plain object from a KeyUsage message. Also converts values to other types if specified. + * @param message KeyUsage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.KeyUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyUsage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace KeyUsage { + + /** Properties of a KeyUsageOptions. */ + interface IKeyUsageOptions { + + /** KeyUsageOptions digitalSignature */ + digitalSignature?: (boolean|null); + + /** KeyUsageOptions contentCommitment */ + contentCommitment?: (boolean|null); + + /** KeyUsageOptions keyEncipherment */ + keyEncipherment?: (boolean|null); + + /** KeyUsageOptions dataEncipherment */ + dataEncipherment?: (boolean|null); + + /** KeyUsageOptions keyAgreement */ + keyAgreement?: (boolean|null); + + /** KeyUsageOptions certSign */ + certSign?: (boolean|null); + + /** KeyUsageOptions crlSign */ + crlSign?: (boolean|null); + + /** KeyUsageOptions encipherOnly */ + encipherOnly?: (boolean|null); + + /** KeyUsageOptions decipherOnly */ + decipherOnly?: (boolean|null); + } + + /** Represents a KeyUsageOptions. */ + class KeyUsageOptions implements IKeyUsageOptions { + + /** + * Constructs a new KeyUsageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions); + + /** KeyUsageOptions digitalSignature. */ + public digitalSignature: boolean; + + /** KeyUsageOptions contentCommitment. */ + public contentCommitment: boolean; + + /** KeyUsageOptions keyEncipherment. */ + public keyEncipherment: boolean; + + /** KeyUsageOptions dataEncipherment. */ + public dataEncipherment: boolean; + + /** KeyUsageOptions keyAgreement. */ + public keyAgreement: boolean; + + /** KeyUsageOptions certSign. */ + public certSign: boolean; + + /** KeyUsageOptions crlSign. */ + public crlSign: boolean; + + /** KeyUsageOptions encipherOnly. */ + public encipherOnly: boolean; + + /** KeyUsageOptions decipherOnly. */ + public decipherOnly: boolean; + + /** + * Creates a new KeyUsageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyUsageOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions): google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions; + + /** + * Encodes the specified KeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @param message KeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @param message KeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions; + + /** + * Verifies a KeyUsageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyUsageOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions; + + /** + * Creates a plain object from a KeyUsageOptions message. Also converts values to other types if specified. + * @param message KeyUsageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyUsageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExtendedKeyUsageOptions. */ + interface IExtendedKeyUsageOptions { + + /** ExtendedKeyUsageOptions serverAuth */ + serverAuth?: (boolean|null); + + /** ExtendedKeyUsageOptions clientAuth */ + clientAuth?: (boolean|null); + + /** ExtendedKeyUsageOptions codeSigning */ + codeSigning?: (boolean|null); + + /** ExtendedKeyUsageOptions emailProtection */ + emailProtection?: (boolean|null); + + /** ExtendedKeyUsageOptions timeStamping */ + timeStamping?: (boolean|null); + + /** ExtendedKeyUsageOptions ocspSigning */ + ocspSigning?: (boolean|null); + } + + /** Represents an ExtendedKeyUsageOptions. */ + class ExtendedKeyUsageOptions implements IExtendedKeyUsageOptions { + + /** + * Constructs a new ExtendedKeyUsageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions); + + /** ExtendedKeyUsageOptions serverAuth. */ + public serverAuth: boolean; + + /** ExtendedKeyUsageOptions clientAuth. */ + public clientAuth: boolean; + + /** ExtendedKeyUsageOptions codeSigning. */ + public codeSigning: boolean; + + /** ExtendedKeyUsageOptions emailProtection. */ + public emailProtection: boolean; + + /** ExtendedKeyUsageOptions timeStamping. */ + public timeStamping: boolean; + + /** ExtendedKeyUsageOptions ocspSigning. */ + public ocspSigning: boolean; + + /** + * Creates a new ExtendedKeyUsageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtendedKeyUsageOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions): google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Encodes the specified ExtendedKeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @param message ExtendedKeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtendedKeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @param message ExtendedKeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Verifies an ExtendedKeyUsageOptions message. + * @param message Plain 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 ExtendedKeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtendedKeyUsageOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Creates a plain object from an ExtendedKeyUsageOptions message. Also converts values to other types if specified. + * @param message ExtendedKeyUsageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtendedKeyUsageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Subject. */ + interface ISubject { + + /** Subject countryCode */ + countryCode?: (string|null); + + /** Subject organization */ + organization?: (string|null); + + /** Subject organizationalUnit */ + organizationalUnit?: (string|null); + + /** Subject locality */ + locality?: (string|null); + + /** Subject province */ + province?: (string|null); + + /** Subject streetAddress */ + streetAddress?: (string|null); + + /** Subject postalCode */ + postalCode?: (string|null); + } + + /** Represents a Subject. */ + class Subject implements ISubject { + + /** + * Constructs a new Subject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ISubject); + + /** Subject countryCode. */ + public countryCode: string; + + /** Subject organization. */ + public organization: string; + + /** Subject organizationalUnit. */ + public organizationalUnit: string; + + /** Subject locality. */ + public locality: string; + + /** Subject province. */ + public province: string; + + /** Subject streetAddress. */ + public streetAddress: string; + + /** Subject postalCode. */ + public postalCode: string; + + /** + * Creates a new Subject instance using the specified properties. + * @param [properties] Properties to set + * @returns Subject instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ISubject): google.cloud.security.privateca.v1beta1.Subject; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.Subject; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.Subject; + + /** + * Verifies a Subject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Subject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.Subject; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @param message Subject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Subject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SubjectAltNames. */ + interface ISubjectAltNames { + + /** SubjectAltNames dnsNames */ + dnsNames?: (string[]|null); + + /** SubjectAltNames uris */ + uris?: (string[]|null); + + /** SubjectAltNames emailAddresses */ + emailAddresses?: (string[]|null); + + /** SubjectAltNames ipAddresses */ + ipAddresses?: (string[]|null); + + /** SubjectAltNames customSans */ + customSans?: (google.cloud.security.privateca.v1beta1.IX509Extension[]|null); + } + + /** Represents a SubjectAltNames. */ + class SubjectAltNames implements ISubjectAltNames { + + /** + * Constructs a new SubjectAltNames. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ISubjectAltNames); + + /** SubjectAltNames dnsNames. */ + public dnsNames: string[]; + + /** SubjectAltNames uris. */ + public uris: string[]; + + /** SubjectAltNames emailAddresses. */ + public emailAddresses: string[]; + + /** SubjectAltNames ipAddresses. */ + public ipAddresses: string[]; + + /** SubjectAltNames customSans. */ + public customSans: google.cloud.security.privateca.v1beta1.IX509Extension[]; + + /** + * Creates a new SubjectAltNames instance using the specified properties. + * @param [properties] Properties to set + * @returns SubjectAltNames instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ISubjectAltNames): google.cloud.security.privateca.v1beta1.SubjectAltNames; + + /** + * Encodes the specified SubjectAltNames message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubjectAltNames.verify|verify} messages. + * @param message SubjectAltNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ISubjectAltNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubjectAltNames message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubjectAltNames.verify|verify} messages. + * @param message SubjectAltNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ISubjectAltNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.SubjectAltNames; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.SubjectAltNames; + + /** + * Verifies a SubjectAltNames message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubjectAltNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubjectAltNames + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.SubjectAltNames; + + /** + * Creates a plain object from a SubjectAltNames message. Also converts values to other types if specified. + * @param message SubjectAltNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.SubjectAltNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubjectAltNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** RevocationReason enum. */ + enum RevocationReason { + REVOCATION_REASON_UNSPECIFIED = 0, + KEY_COMPROMISE = 1, + CERTIFICATE_AUTHORITY_COMPROMISE = 2, + AFFILIATION_CHANGED = 3, + SUPERSEDED = 4, + CESSATION_OF_OPERATION = 5, + CERTIFICATE_HOLD = 6, + PRIVILEGE_WITHDRAWN = 7, + ATTRIBUTE_AUTHORITY_COMPROMISE = 8 + } + + /** Represents a CertificateAuthorityService */ + class CertificateAuthorityService extends $protobuf.rpc.Service { + + /** + * Constructs a new CertificateAuthorityService 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 CertificateAuthorityService 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): CertificateAuthorityService; + + /** + * Calls CreateCertificate. + * @param request CreateCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public createCertificate(request: google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateCallback): void; + + /** + * Calls CreateCertificate. + * @param request CreateCertificateRequest message or plain object + * @returns Promise + */ + public createCertificate(request: google.cloud.security.privateca.v1beta1.ICreateCertificateRequest): Promise; + + /** + * Calls GetCertificate. + * @param request GetCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public getCertificate(request: google.cloud.security.privateca.v1beta1.IGetCertificateRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateCallback): void; + + /** + * Calls GetCertificate. + * @param request GetCertificateRequest message or plain object + * @returns Promise + */ + public getCertificate(request: google.cloud.security.privateca.v1beta1.IGetCertificateRequest): Promise; + + /** + * Calls ListCertificates. + * @param request ListCertificatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificatesResponse + */ + public listCertificates(request: google.cloud.security.privateca.v1beta1.IListCertificatesRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificatesCallback): void; + + /** + * Calls ListCertificates. + * @param request ListCertificatesRequest message or plain object + * @returns Promise + */ + public listCertificates(request: google.cloud.security.privateca.v1beta1.IListCertificatesRequest): Promise; + + /** + * Calls RevokeCertificate. + * @param request RevokeCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public revokeCertificate(request: google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificateCallback): void; + + /** + * Calls RevokeCertificate. + * @param request RevokeCertificateRequest message or plain object + * @returns Promise + */ + public revokeCertificate(request: google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest): Promise; + + /** + * Calls UpdateCertificate. + * @param request UpdateCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public updateCertificate(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateCallback): void; + + /** + * Calls UpdateCertificate. + * @param request UpdateCertificateRequest message or plain object + * @returns Promise + */ + public updateCertificate(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest): Promise; + + /** + * Calls ActivateCertificateAuthority. + * @param request ActivateCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public activateCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthorityCallback): void; + + /** + * Calls ActivateCertificateAuthority. + * @param request ActivateCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public activateCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest): Promise; + + /** + * Calls CreateCertificateAuthority. + * @param request CreateCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCertificateAuthority(request: google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthorityCallback): void; + + /** + * Calls CreateCertificateAuthority. + * @param request CreateCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public createCertificateAuthority(request: google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest): Promise; + + /** + * Calls DisableCertificateAuthority. + * @param request DisableCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public disableCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthorityCallback): void; + + /** + * Calls DisableCertificateAuthority. + * @param request DisableCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public disableCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest): Promise; + + /** + * Calls EnableCertificateAuthority. + * @param request EnableCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public enableCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthorityCallback): void; + + /** + * Calls EnableCertificateAuthority. + * @param request EnableCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public enableCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest): Promise; + + /** + * Calls FetchCertificateAuthorityCsr. + * @param request FetchCertificateAuthorityCsrRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchCertificateAuthorityCsrResponse + */ + public fetchCertificateAuthorityCsr(request: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsrCallback): void; + + /** + * Calls FetchCertificateAuthorityCsr. + * @param request FetchCertificateAuthorityCsrRequest message or plain object + * @returns Promise + */ + public fetchCertificateAuthorityCsr(request: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest): Promise; + + /** + * Calls GetCertificateAuthority. + * @param request GetCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CertificateAuthority + */ + public getCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthorityCallback): void; + + /** + * Calls GetCertificateAuthority. + * @param request GetCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public getCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest): Promise; + + /** + * Calls ListCertificateAuthorities. + * @param request ListCertificateAuthoritiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificateAuthoritiesResponse + */ + public listCertificateAuthorities(request: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthoritiesCallback): void; + + /** + * Calls ListCertificateAuthorities. + * @param request ListCertificateAuthoritiesRequest message or plain object + * @returns Promise + */ + public listCertificateAuthorities(request: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest): Promise; + + /** + * Calls RestoreCertificateAuthority. + * @param request RestoreCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restoreCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthorityCallback): void; + + /** + * Calls RestoreCertificateAuthority. + * @param request RestoreCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public restoreCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest): Promise; + + /** + * Calls ScheduleDeleteCertificateAuthority. + * @param request ScheduleDeleteCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public scheduleDeleteCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthorityCallback): void; + + /** + * Calls ScheduleDeleteCertificateAuthority. + * @param request ScheduleDeleteCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public scheduleDeleteCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest): Promise; + + /** + * Calls UpdateCertificateAuthority. + * @param request UpdateCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthorityCallback): void; + + /** + * Calls UpdateCertificateAuthority. + * @param request UpdateCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public updateCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest): Promise; + + /** + * Calls CreateCertificateRevocationList. + * @param request CreateCertificateRevocationListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationListCallback): void; + + /** + * Calls CreateCertificateRevocationList. + * @param request CreateCertificateRevocationListRequest message or plain object + * @returns Promise + */ + public createCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest): Promise; + + /** + * Calls GetCertificateRevocationList. + * @param request GetCertificateRevocationListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CertificateRevocationList + */ + public getCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationListCallback): void; + + /** + * Calls GetCertificateRevocationList. + * @param request GetCertificateRevocationListRequest message or plain object + * @returns Promise + */ + public getCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest): Promise; + + /** + * Calls ListCertificateRevocationLists. + * @param request ListCertificateRevocationListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificateRevocationListsResponse + */ + public listCertificateRevocationLists(request: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationListsCallback): void; + + /** + * Calls ListCertificateRevocationLists. + * @param request ListCertificateRevocationListsRequest message or plain object + * @returns Promise + */ + public listCertificateRevocationLists(request: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest): Promise; + + /** + * Calls UpdateCertificateRevocationList. + * @param request UpdateCertificateRevocationListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationListCallback): void; + + /** + * Calls UpdateCertificateRevocationList. + * @param request UpdateCertificateRevocationListRequest message or plain object + * @returns Promise + */ + public updateCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest): Promise; + + /** + * Calls CreateReusableConfig. + * @param request CreateReusableConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createReusableConfig(request: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfigCallback): void; + + /** + * Calls CreateReusableConfig. + * @param request CreateReusableConfigRequest message or plain object + * @returns Promise + */ + public createReusableConfig(request: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest): Promise; + + /** + * Calls DeleteReusableConfig. + * @param request DeleteReusableConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteReusableConfig(request: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfigCallback): void; + + /** + * Calls DeleteReusableConfig. + * @param request DeleteReusableConfigRequest message or plain object + * @returns Promise + */ + public deleteReusableConfig(request: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest): Promise; + + /** + * Calls GetReusableConfig. + * @param request GetReusableConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReusableConfig + */ + public getReusableConfig(request: google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfigCallback): void; + + /** + * Calls GetReusableConfig. + * @param request GetReusableConfigRequest message or plain object + * @returns Promise + */ + public getReusableConfig(request: google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest): Promise; + + /** + * Calls ListReusableConfigs. + * @param request ListReusableConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListReusableConfigsResponse + */ + public listReusableConfigs(request: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigsCallback): void; + + /** + * Calls ListReusableConfigs. + * @param request ListReusableConfigsRequest message or plain object + * @returns Promise + */ + public listReusableConfigs(request: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest): Promise; + + /** + * Calls UpdateReusableConfig. + * @param request UpdateReusableConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateReusableConfig(request: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfigCallback): void; + + /** + * Calls UpdateReusableConfig. + * @param request UpdateReusableConfigRequest message or plain object + * @returns Promise + */ + public updateReusableConfig(request: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest): Promise; + } + + namespace CertificateAuthorityService { + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type CreateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type GetCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificates}. + * @param error Error, if any + * @param [response] ListCertificatesResponse + */ + type ListCertificatesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListCertificatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#revokeCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type RevokeCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type UpdateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#activateCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type ActivateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#disableCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type DisableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#enableCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type EnableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * @param error Error, if any + * @param [response] FetchCertificateAuthorityCsrResponse + */ + type FetchCertificateAuthorityCsrCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateAuthority}. + * @param error Error, if any + * @param [response] CertificateAuthority + */ + type GetCertificateAuthorityCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.CertificateAuthority) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateAuthorities}. + * @param error Error, if any + * @param [response] ListCertificateAuthoritiesResponse + */ + type ListCertificateAuthoritiesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#restoreCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type RestoreCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#scheduleDeleteCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type ScheduleDeleteCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateRevocationList}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateRevocationList}. + * @param error Error, if any + * @param [response] CertificateRevocationList + */ + type GetCertificateRevocationListCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.CertificateRevocationList) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateRevocationLists}. + * @param error Error, if any + * @param [response] ListCertificateRevocationListsResponse + */ + type ListCertificateRevocationListsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateRevocationList}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createReusableConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateReusableConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#deleteReusableConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteReusableConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getReusableConfig}. + * @param error Error, if any + * @param [response] ReusableConfig + */ + type GetReusableConfigCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ReusableConfig) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listReusableConfigs}. + * @param error Error, if any + * @param [response] ListReusableConfigsResponse + */ + type ListReusableConfigsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateReusableConfig}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateReusableConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreateCertificateRequest. */ + interface ICreateCertificateRequest { + + /** CreateCertificateRequest parent */ + parent?: (string|null); + + /** CreateCertificateRequest certificateId */ + certificateId?: (string|null); + + /** CreateCertificateRequest certificate */ + certificate?: (google.cloud.security.privateca.v1beta1.ICertificate|null); + + /** CreateCertificateRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateCertificateRequest. */ + class CreateCertificateRequest implements ICreateCertificateRequest { + + /** + * Constructs a new CreateCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateRequest); + + /** CreateCertificateRequest parent. */ + public parent: string; + + /** CreateCertificateRequest certificateId. */ + public certificateId: string; + + /** CreateCertificateRequest certificate. */ + public certificate?: (google.cloud.security.privateca.v1beta1.ICertificate|null); + + /** CreateCertificateRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateRequest): google.cloud.security.privateca.v1beta1.CreateCertificateRequest; + + /** + * Encodes the specified CreateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRequest.verify|verify} messages. + * @param message CreateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRequest.verify|verify} messages. + * @param message CreateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CreateCertificateRequest; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CreateCertificateRequest; + + /** + * Verifies a CreateCertificateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CreateCertificateRequest; + + /** + * Creates a plain object from a CreateCertificateRequest message. Also converts values to other types if specified. + * @param message CreateCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CreateCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateRequest. */ + interface IGetCertificateRequest { + + /** GetCertificateRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateRequest. */ + class GetCertificateRequest implements IGetCertificateRequest { + + /** + * Constructs a new GetCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IGetCertificateRequest); + + /** GetCertificateRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IGetCertificateRequest): google.cloud.security.privateca.v1beta1.GetCertificateRequest; + + /** + * Encodes the specified GetCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRequest.verify|verify} messages. + * @param message GetCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IGetCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRequest.verify|verify} messages. + * @param message GetCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IGetCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.GetCertificateRequest; + + /** + * Decodes a GetCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.GetCertificateRequest; + + /** + * Verifies a GetCertificateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.GetCertificateRequest; + + /** + * Creates a plain object from a GetCertificateRequest message. Also converts values to other types if specified. + * @param message GetCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.GetCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificatesRequest. */ + interface IListCertificatesRequest { + + /** ListCertificatesRequest parent */ + parent?: (string|null); + + /** ListCertificatesRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificatesRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificatesRequest filter */ + filter?: (string|null); + + /** ListCertificatesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificatesRequest. */ + class ListCertificatesRequest implements IListCertificatesRequest { + + /** + * Constructs a new ListCertificatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListCertificatesRequest); + + /** ListCertificatesRequest parent. */ + public parent: string; + + /** ListCertificatesRequest pageSize. */ + public pageSize: number; + + /** ListCertificatesRequest pageToken. */ + public pageToken: string; + + /** ListCertificatesRequest filter. */ + public filter: string; + + /** ListCertificatesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificatesRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListCertificatesRequest): google.cloud.security.privateca.v1beta1.ListCertificatesRequest; + + /** + * Encodes the specified ListCertificatesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest.verify|verify} messages. + * @param message ListCertificatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListCertificatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificatesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest.verify|verify} messages. + * @param message ListCertificatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListCertificatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListCertificatesRequest; + + /** + * Decodes a ListCertificatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListCertificatesRequest; + + /** + * Verifies a ListCertificatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListCertificatesRequest; + + /** + * Creates a plain object from a ListCertificatesRequest message. Also converts values to other types if specified. + * @param message ListCertificatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListCertificatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificatesResponse. */ + interface IListCertificatesResponse { + + /** ListCertificatesResponse certificates */ + certificates?: (google.cloud.security.privateca.v1beta1.ICertificate[]|null); + + /** ListCertificatesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificatesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificatesResponse. */ + class ListCertificatesResponse implements IListCertificatesResponse { + + /** + * Constructs a new ListCertificatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListCertificatesResponse); + + /** ListCertificatesResponse certificates. */ + public certificates: google.cloud.security.privateca.v1beta1.ICertificate[]; + + /** ListCertificatesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificatesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificatesResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListCertificatesResponse): google.cloud.security.privateca.v1beta1.ListCertificatesResponse; + + /** + * Encodes the specified ListCertificatesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.verify|verify} messages. + * @param message ListCertificatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListCertificatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificatesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.verify|verify} messages. + * @param message ListCertificatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListCertificatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListCertificatesResponse; + + /** + * Decodes a ListCertificatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListCertificatesResponse; + + /** + * Verifies a ListCertificatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListCertificatesResponse; + + /** + * Creates a plain object from a ListCertificatesResponse message. Also converts values to other types if specified. + * @param message ListCertificatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListCertificatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RevokeCertificateRequest. */ + interface IRevokeCertificateRequest { + + /** RevokeCertificateRequest name */ + name?: (string|null); + + /** RevokeCertificateRequest reason */ + reason?: (google.cloud.security.privateca.v1beta1.RevocationReason|keyof typeof google.cloud.security.privateca.v1beta1.RevocationReason|null); + + /** RevokeCertificateRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RevokeCertificateRequest. */ + class RevokeCertificateRequest implements IRevokeCertificateRequest { + + /** + * Constructs a new RevokeCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest); + + /** RevokeCertificateRequest name. */ + public name: string; + + /** RevokeCertificateRequest reason. */ + public reason: (google.cloud.security.privateca.v1beta1.RevocationReason|keyof typeof google.cloud.security.privateca.v1beta1.RevocationReason); + + /** RevokeCertificateRequest requestId. */ + public requestId: string; + + /** + * Creates a new RevokeCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RevokeCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest): google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; + + /** + * Encodes the specified RevokeCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.verify|verify} messages. + * @param message RevokeCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevokeCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.verify|verify} messages. + * @param message RevokeCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; + + /** + * Verifies a RevokeCertificateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevokeCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevokeCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.RevokeCertificateRequest; + + /** + * Creates a plain object from a RevokeCertificateRequest message. Also converts values to other types if specified. + * @param message RevokeCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.RevokeCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevokeCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateRequest. */ + interface IUpdateCertificateRequest { + + /** UpdateCertificateRequest certificate */ + certificate?: (google.cloud.security.privateca.v1beta1.ICertificate|null); + + /** UpdateCertificateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateRequest. */ + class UpdateCertificateRequest implements IUpdateCertificateRequest { + + /** + * Constructs a new UpdateCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest); + + /** UpdateCertificateRequest certificate. */ + public certificate?: (google.cloud.security.privateca.v1beta1.ICertificate|null); + + /** UpdateCertificateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest): google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; + + /** + * Encodes the specified UpdateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.verify|verify} messages. + * @param message UpdateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.verify|verify} messages. + * @param message UpdateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; + + /** + * Verifies an UpdateCertificateRequest message. + * @param message Plain 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 UpdateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.UpdateCertificateRequest; + + /** + * Creates a plain object from an UpdateCertificateRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.UpdateCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ActivateCertificateAuthorityRequest. */ + interface IActivateCertificateAuthorityRequest { + + /** ActivateCertificateAuthorityRequest name */ + name?: (string|null); + + /** ActivateCertificateAuthorityRequest pemCaCertificate */ + pemCaCertificate?: (string|null); + + /** ActivateCertificateAuthorityRequest subordinateConfig */ + subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + + /** ActivateCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an ActivateCertificateAuthorityRequest. */ + class ActivateCertificateAuthorityRequest implements IActivateCertificateAuthorityRequest { + + /** + * Constructs a new ActivateCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest); + + /** ActivateCertificateAuthorityRequest name. */ + public name: string; + + /** ActivateCertificateAuthorityRequest pemCaCertificate. */ + public pemCaCertificate: string; + + /** ActivateCertificateAuthorityRequest subordinateConfig. */ + public subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + + /** ActivateCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new ActivateCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @param message ActivateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @param message ActivateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; + + /** + * Verifies an ActivateCertificateAuthorityRequest message. + * @param message Plain 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 ActivateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest; + + /** + * Creates a plain object from an ActivateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message ActivateCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCertificateAuthorityRequest. */ + interface ICreateCertificateAuthorityRequest { + + /** CreateCertificateAuthorityRequest parent */ + parent?: (string|null); + + /** CreateCertificateAuthorityRequest certificateAuthorityId */ + certificateAuthorityId?: (string|null); + + /** CreateCertificateAuthorityRequest certificateAuthority */ + certificateAuthority?: (google.cloud.security.privateca.v1beta1.ICertificateAuthority|null); + + /** CreateCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateCertificateAuthorityRequest. */ + class CreateCertificateAuthorityRequest implements ICreateCertificateAuthorityRequest { + + /** + * Constructs a new CreateCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest); + + /** CreateCertificateAuthorityRequest parent. */ + public parent: string; + + /** CreateCertificateAuthorityRequest certificateAuthorityId. */ + public certificateAuthorityId: string; + + /** CreateCertificateAuthorityRequest certificateAuthority. */ + public certificateAuthority?: (google.cloud.security.privateca.v1beta1.ICertificateAuthority|null); + + /** CreateCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @param message CreateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @param message CreateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; + + /** + * Verifies a CreateCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest; + + /** + * Creates a plain object from a CreateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message CreateCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DisableCertificateAuthorityRequest. */ + interface IDisableCertificateAuthorityRequest { + + /** DisableCertificateAuthorityRequest name */ + name?: (string|null); + + /** DisableCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DisableCertificateAuthorityRequest. */ + class DisableCertificateAuthorityRequest implements IDisableCertificateAuthorityRequest { + + /** + * Constructs a new DisableCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest); + + /** DisableCertificateAuthorityRequest name. */ + public name: string; + + /** DisableCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new DisableCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DisableCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @param message DisableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @param message DisableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; + + /** + * Verifies a DisableCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisableCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest; + + /** + * Creates a plain object from a DisableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message DisableCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisableCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnableCertificateAuthorityRequest. */ + interface IEnableCertificateAuthorityRequest { + + /** EnableCertificateAuthorityRequest name */ + name?: (string|null); + + /** EnableCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an EnableCertificateAuthorityRequest. */ + class EnableCertificateAuthorityRequest implements IEnableCertificateAuthorityRequest { + + /** + * Constructs a new EnableCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest); + + /** EnableCertificateAuthorityRequest name. */ + public name: string; + + /** EnableCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new EnableCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EnableCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @param message EnableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @param message EnableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; + + /** + * Verifies an EnableCertificateAuthorityRequest message. + * @param message Plain 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 EnableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnableCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest; + + /** + * Creates a plain object from an EnableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message EnableCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnableCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchCertificateAuthorityCsrRequest. */ + interface IFetchCertificateAuthorityCsrRequest { + + /** FetchCertificateAuthorityCsrRequest name */ + name?: (string|null); + } + + /** Represents a FetchCertificateAuthorityCsrRequest. */ + class FetchCertificateAuthorityCsrRequest implements IFetchCertificateAuthorityCsrRequest { + + /** + * Constructs a new FetchCertificateAuthorityCsrRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest); + + /** FetchCertificateAuthorityCsrRequest name. */ + public name: string; + + /** + * Creates a new FetchCertificateAuthorityCsrRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchCertificateAuthorityCsrRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; + + /** + * Encodes the specified FetchCertificateAuthorityCsrRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchCertificateAuthorityCsrRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchCertificateAuthorityCsrRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; + + /** + * Decodes a FetchCertificateAuthorityCsrRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; + + /** + * Verifies a FetchCertificateAuthorityCsrRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchCertificateAuthorityCsrRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchCertificateAuthorityCsrRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrRequest message. Also converts values to other types if specified. + * @param message FetchCertificateAuthorityCsrRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchCertificateAuthorityCsrRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchCertificateAuthorityCsrResponse. */ + interface IFetchCertificateAuthorityCsrResponse { + + /** FetchCertificateAuthorityCsrResponse pemCsr */ + pemCsr?: (string|null); + } + + /** Represents a FetchCertificateAuthorityCsrResponse. */ + class FetchCertificateAuthorityCsrResponse implements IFetchCertificateAuthorityCsrResponse { + + /** + * Constructs a new FetchCertificateAuthorityCsrResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse); + + /** FetchCertificateAuthorityCsrResponse pemCsr. */ + public pemCsr: string; + + /** + * Creates a new FetchCertificateAuthorityCsrResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchCertificateAuthorityCsrResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; + + /** + * Verifies a FetchCertificateAuthorityCsrResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchCertificateAuthorityCsrResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchCertificateAuthorityCsrResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrResponse message. Also converts values to other types if specified. + * @param message FetchCertificateAuthorityCsrResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchCertificateAuthorityCsrResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateAuthorityRequest. */ + interface IGetCertificateAuthorityRequest { + + /** GetCertificateAuthorityRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateAuthorityRequest. */ + class GetCertificateAuthorityRequest implements IGetCertificateAuthorityRequest { + + /** + * Constructs a new GetCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest); + + /** GetCertificateAuthorityRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; + + /** + * Encodes the specified GetCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.verify|verify} messages. + * @param message GetCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.verify|verify} messages. + * @param message GetCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; + + /** + * Decodes a GetCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; + + /** + * Verifies a GetCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest; + + /** + * Creates a plain object from a GetCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message GetCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateAuthoritiesRequest. */ + interface IListCertificateAuthoritiesRequest { + + /** ListCertificateAuthoritiesRequest parent */ + parent?: (string|null); + + /** ListCertificateAuthoritiesRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificateAuthoritiesRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificateAuthoritiesRequest filter */ + filter?: (string|null); + + /** ListCertificateAuthoritiesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificateAuthoritiesRequest. */ + class ListCertificateAuthoritiesRequest implements IListCertificateAuthoritiesRequest { + + /** + * Constructs a new ListCertificateAuthoritiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest); + + /** ListCertificateAuthoritiesRequest parent. */ + public parent: string; + + /** ListCertificateAuthoritiesRequest pageSize. */ + public pageSize: number; + + /** ListCertificateAuthoritiesRequest pageToken. */ + public pageToken: string; + + /** ListCertificateAuthoritiesRequest filter. */ + public filter: string; + + /** ListCertificateAuthoritiesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificateAuthoritiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateAuthoritiesRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; + + /** + * Encodes the specified ListCertificateAuthoritiesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @param message ListCertificateAuthoritiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateAuthoritiesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @param message ListCertificateAuthoritiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateAuthoritiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; + + /** + * Decodes a ListCertificateAuthoritiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; + + /** + * Verifies a ListCertificateAuthoritiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateAuthoritiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateAuthoritiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest; + + /** + * Creates a plain object from a ListCertificateAuthoritiesRequest message. Also converts values to other types if specified. + * @param message ListCertificateAuthoritiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateAuthoritiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateAuthoritiesResponse. */ + interface IListCertificateAuthoritiesResponse { + + /** ListCertificateAuthoritiesResponse certificateAuthorities */ + certificateAuthorities?: (google.cloud.security.privateca.v1beta1.ICertificateAuthority[]|null); + + /** ListCertificateAuthoritiesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificateAuthoritiesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificateAuthoritiesResponse. */ + class ListCertificateAuthoritiesResponse implements IListCertificateAuthoritiesResponse { + + /** + * Constructs a new ListCertificateAuthoritiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse); + + /** ListCertificateAuthoritiesResponse certificateAuthorities. */ + public certificateAuthorities: google.cloud.security.privateca.v1beta1.ICertificateAuthority[]; + + /** ListCertificateAuthoritiesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificateAuthoritiesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificateAuthoritiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateAuthoritiesResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; + + /** + * Encodes the specified ListCertificateAuthoritiesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @param message ListCertificateAuthoritiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateAuthoritiesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @param message ListCertificateAuthoritiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateAuthoritiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; + + /** + * Decodes a ListCertificateAuthoritiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; + + /** + * Verifies a ListCertificateAuthoritiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateAuthoritiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateAuthoritiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse; + + /** + * Creates a plain object from a ListCertificateAuthoritiesResponse message. Also converts values to other types if specified. + * @param message ListCertificateAuthoritiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateAuthoritiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RestoreCertificateAuthorityRequest. */ + interface IRestoreCertificateAuthorityRequest { + + /** RestoreCertificateAuthorityRequest name */ + name?: (string|null); + + /** RestoreCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RestoreCertificateAuthorityRequest. */ + class RestoreCertificateAuthorityRequest implements IRestoreCertificateAuthorityRequest { + + /** + * Constructs a new RestoreCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest); + + /** RestoreCertificateAuthorityRequest name. */ + public name: string; + + /** RestoreCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new RestoreCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestoreCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; + + /** + * Encodes the specified RestoreCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.verify|verify} messages. + * @param message RestoreCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestoreCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.verify|verify} messages. + * @param message RestoreCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestoreCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestoreCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; + + /** + * Decodes a RestoreCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestoreCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; + + /** + * Verifies a RestoreCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestoreCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestoreCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest; + + /** + * Creates a plain object from a RestoreCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message RestoreCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestoreCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ScheduleDeleteCertificateAuthorityRequest. */ + interface IScheduleDeleteCertificateAuthorityRequest { + + /** ScheduleDeleteCertificateAuthorityRequest name */ + name?: (string|null); + + /** ScheduleDeleteCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents a ScheduleDeleteCertificateAuthorityRequest. */ + class ScheduleDeleteCertificateAuthorityRequest implements IScheduleDeleteCertificateAuthorityRequest { + + /** + * Constructs a new ScheduleDeleteCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest); + + /** ScheduleDeleteCertificateAuthorityRequest name. */ + public name: string; + + /** ScheduleDeleteCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new ScheduleDeleteCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduleDeleteCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; + + /** + * Encodes the specified ScheduleDeleteCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest.verify|verify} messages. + * @param message ScheduleDeleteCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduleDeleteCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest.verify|verify} messages. + * @param message ScheduleDeleteCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduleDeleteCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduleDeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; + + /** + * Decodes a ScheduleDeleteCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduleDeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; + + /** + * Verifies a ScheduleDeleteCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScheduleDeleteCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduleDeleteCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest; + + /** + * Creates a plain object from a ScheduleDeleteCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message ScheduleDeleteCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduleDeleteCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateAuthorityRequest. */ + interface IUpdateCertificateAuthorityRequest { + + /** UpdateCertificateAuthorityRequest certificateAuthority */ + certificateAuthority?: (google.cloud.security.privateca.v1beta1.ICertificateAuthority|null); + + /** UpdateCertificateAuthorityRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateAuthorityRequest. */ + class UpdateCertificateAuthorityRequest implements IUpdateCertificateAuthorityRequest { + + /** + * Constructs a new UpdateCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest); + + /** UpdateCertificateAuthorityRequest certificateAuthority. */ + public certificateAuthority?: (google.cloud.security.privateca.v1beta1.ICertificateAuthority|null); + + /** UpdateCertificateAuthorityRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest): google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @param message UpdateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @param message UpdateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; + + /** + * Verifies an UpdateCertificateAuthorityRequest message. + * @param message Plain 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 UpdateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest; + + /** + * Creates a plain object from an UpdateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCertificateRevocationListRequest. */ + interface ICreateCertificateRevocationListRequest { + + /** CreateCertificateRevocationListRequest parent */ + parent?: (string|null); + + /** CreateCertificateRevocationListRequest certificateRevocationListId */ + certificateRevocationListId?: (string|null); + + /** CreateCertificateRevocationListRequest certificateRevocationList */ + certificateRevocationList?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null); + + /** CreateCertificateRevocationListRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateCertificateRevocationListRequest. */ + class CreateCertificateRevocationListRequest implements ICreateCertificateRevocationListRequest { + + /** + * Constructs a new CreateCertificateRevocationListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest); + + /** CreateCertificateRevocationListRequest parent. */ + public parent: string; + + /** CreateCertificateRevocationListRequest certificateRevocationListId. */ + public certificateRevocationListId: string; + + /** CreateCertificateRevocationListRequest certificateRevocationList. */ + public certificateRevocationList?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null); + + /** CreateCertificateRevocationListRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateCertificateRevocationListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCertificateRevocationListRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; + + /** + * Encodes the specified CreateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. + * @param message CreateCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. + * @param message CreateCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; + + /** + * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; + + /** + * Verifies a CreateCertificateRevocationListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCertificateRevocationListRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; + + /** + * Creates a plain object from a CreateCertificateRevocationListRequest message. Also converts values to other types if specified. + * @param message CreateCertificateRevocationListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCertificateRevocationListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateRevocationListRequest. */ + interface IGetCertificateRevocationListRequest { + + /** GetCertificateRevocationListRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateRevocationListRequest. */ + class GetCertificateRevocationListRequest implements IGetCertificateRevocationListRequest { + + /** + * Constructs a new GetCertificateRevocationListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest); + + /** GetCertificateRevocationListRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateRevocationListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateRevocationListRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest): google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; + + /** + * Encodes the specified GetCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. + * @param message GetCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. + * @param message GetCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; + + /** + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; + + /** + * Verifies a GetCertificateRevocationListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateRevocationListRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest; + + /** + * Creates a plain object from a GetCertificateRevocationListRequest message. Also converts values to other types if specified. + * @param message GetCertificateRevocationListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateRevocationListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateRevocationListsRequest. */ + interface IListCertificateRevocationListsRequest { + + /** ListCertificateRevocationListsRequest parent */ + parent?: (string|null); + + /** ListCertificateRevocationListsRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificateRevocationListsRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificateRevocationListsRequest filter */ + filter?: (string|null); + + /** ListCertificateRevocationListsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificateRevocationListsRequest. */ + class ListCertificateRevocationListsRequest implements IListCertificateRevocationListsRequest { + + /** + * Constructs a new ListCertificateRevocationListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest); + + /** ListCertificateRevocationListsRequest parent. */ + public parent: string; + + /** ListCertificateRevocationListsRequest pageSize. */ + public pageSize: number; + + /** ListCertificateRevocationListsRequest pageToken. */ + public pageToken: string; + + /** ListCertificateRevocationListsRequest filter. */ + public filter: string; + + /** ListCertificateRevocationListsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificateRevocationListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateRevocationListsRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; + + /** + * Encodes the specified ListCertificateRevocationListsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @param message ListCertificateRevocationListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateRevocationListsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @param message ListCertificateRevocationListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateRevocationListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; + + /** + * Decodes a ListCertificateRevocationListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; + + /** + * Verifies a ListCertificateRevocationListsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateRevocationListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateRevocationListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest; + + /** + * Creates a plain object from a ListCertificateRevocationListsRequest message. Also converts values to other types if specified. + * @param message ListCertificateRevocationListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateRevocationListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateRevocationListsResponse. */ + interface IListCertificateRevocationListsResponse { + + /** ListCertificateRevocationListsResponse certificateRevocationLists */ + certificateRevocationLists?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList[]|null); + + /** ListCertificateRevocationListsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificateRevocationListsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificateRevocationListsResponse. */ + class ListCertificateRevocationListsResponse implements IListCertificateRevocationListsResponse { + + /** + * Constructs a new ListCertificateRevocationListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse); + + /** ListCertificateRevocationListsResponse certificateRevocationLists. */ + public certificateRevocationLists: google.cloud.security.privateca.v1beta1.ICertificateRevocationList[]; + + /** ListCertificateRevocationListsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificateRevocationListsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificateRevocationListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateRevocationListsResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; + + /** + * Encodes the specified ListCertificateRevocationListsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @param message ListCertificateRevocationListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateRevocationListsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @param message ListCertificateRevocationListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateRevocationListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; + + /** + * Decodes a ListCertificateRevocationListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; + + /** + * Verifies a ListCertificateRevocationListsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateRevocationListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateRevocationListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse; + + /** + * Creates a plain object from a ListCertificateRevocationListsResponse message. Also converts values to other types if specified. + * @param message ListCertificateRevocationListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateRevocationListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateRevocationListRequest. */ + interface IUpdateCertificateRevocationListRequest { + + /** UpdateCertificateRevocationListRequest certificateRevocationList */ + certificateRevocationList?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null); + + /** UpdateCertificateRevocationListRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRevocationListRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateRevocationListRequest. */ + class UpdateCertificateRevocationListRequest implements IUpdateCertificateRevocationListRequest { + + /** + * Constructs a new UpdateCertificateRevocationListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest); + + /** UpdateCertificateRevocationListRequest certificateRevocationList. */ + public certificateRevocationList?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null); + + /** UpdateCertificateRevocationListRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRevocationListRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateRevocationListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateRevocationListRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest): google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @param message UpdateCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @param message UpdateCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; + + /** + * Verifies an UpdateCertificateRevocationListRequest message. + * @param message Plain 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 UpdateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateRevocationListRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest; + + /** + * Creates a plain object from an UpdateCertificateRevocationListRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateRevocationListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateRevocationListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateReusableConfigRequest. */ + interface ICreateReusableConfigRequest { + + /** CreateReusableConfigRequest parent */ + parent?: (string|null); + + /** CreateReusableConfigRequest reusableConfigId */ + reusableConfigId?: (string|null); + + /** CreateReusableConfigRequest reusableConfig */ + reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); + + /** CreateReusableConfigRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateReusableConfigRequest. */ + class CreateReusableConfigRequest implements ICreateReusableConfigRequest { + + /** + * Constructs a new CreateReusableConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest); + + /** CreateReusableConfigRequest parent. */ + public parent: string; + + /** CreateReusableConfigRequest reusableConfigId. */ + public reusableConfigId: string; + + /** CreateReusableConfigRequest reusableConfig. */ + public reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); + + /** CreateReusableConfigRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateReusableConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateReusableConfigRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; + + /** + * Encodes the specified CreateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. + * @param message CreateReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. + * @param message CreateReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateReusableConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; + + /** + * Decodes a CreateReusableConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; + + /** + * Verifies a CreateReusableConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateReusableConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; + + /** + * Creates a plain object from a CreateReusableConfigRequest message. Also converts values to other types if specified. + * @param message CreateReusableConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateReusableConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteReusableConfigRequest. */ + interface IDeleteReusableConfigRequest { + + /** DeleteReusableConfigRequest name */ + name?: (string|null); + + /** DeleteReusableConfigRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteReusableConfigRequest. */ + class DeleteReusableConfigRequest implements IDeleteReusableConfigRequest { + + /** + * Constructs a new DeleteReusableConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest); + + /** DeleteReusableConfigRequest name. */ + public name: string; + + /** DeleteReusableConfigRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteReusableConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteReusableConfigRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; + + /** + * Encodes the specified DeleteReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. + * @param message DeleteReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. + * @param message DeleteReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; + + /** + * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; + + /** + * Verifies a DeleteReusableConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteReusableConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; + + /** + * Creates a plain object from a DeleteReusableConfigRequest message. Also converts values to other types if specified. + * @param message DeleteReusableConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteReusableConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetReusableConfigRequest. */ + interface IGetReusableConfigRequest { + + /** GetReusableConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetReusableConfigRequest. */ + class GetReusableConfigRequest implements IGetReusableConfigRequest { + + /** + * Constructs a new GetReusableConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest); + + /** GetReusableConfigRequest name. */ + public name: string; + + /** + * Creates a new GetReusableConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetReusableConfigRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest): google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; + + /** + * Encodes the specified GetReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.verify|verify} messages. + * @param message GetReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.verify|verify} messages. + * @param message GetReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetReusableConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; + + /** + * Decodes a GetReusableConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; + + /** + * Verifies a GetReusableConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetReusableConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.GetReusableConfigRequest; + + /** + * Creates a plain object from a GetReusableConfigRequest message. Also converts values to other types if specified. + * @param message GetReusableConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.GetReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetReusableConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListReusableConfigsRequest. */ + interface IListReusableConfigsRequest { + + /** ListReusableConfigsRequest parent */ + parent?: (string|null); + + /** ListReusableConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListReusableConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListReusableConfigsRequest filter */ + filter?: (string|null); + + /** ListReusableConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListReusableConfigsRequest. */ + class ListReusableConfigsRequest implements IListReusableConfigsRequest { + + /** + * Constructs a new ListReusableConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest); + + /** ListReusableConfigsRequest parent. */ + public parent: string; + + /** ListReusableConfigsRequest pageSize. */ + public pageSize: number; + + /** ListReusableConfigsRequest pageToken. */ + public pageToken: string; + + /** ListReusableConfigsRequest filter. */ + public filter: string; + + /** ListReusableConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListReusableConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReusableConfigsRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest): google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; + + /** + * Encodes the specified ListReusableConfigsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.verify|verify} messages. + * @param message ListReusableConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReusableConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.verify|verify} messages. + * @param message ListReusableConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReusableConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReusableConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; + + /** + * Decodes a ListReusableConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReusableConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; + + /** + * Verifies a ListReusableConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReusableConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReusableConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest; + + /** + * Creates a plain object from a ListReusableConfigsRequest message. Also converts values to other types if specified. + * @param message ListReusableConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReusableConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListReusableConfigsResponse. */ + interface IListReusableConfigsResponse { + + /** ListReusableConfigsResponse reusableConfigs */ + reusableConfigs?: (google.cloud.security.privateca.v1beta1.IReusableConfig[]|null); + + /** ListReusableConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListReusableConfigsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListReusableConfigsResponse. */ + class ListReusableConfigsResponse implements IListReusableConfigsResponse { + + /** + * Constructs a new ListReusableConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse); + + /** ListReusableConfigsResponse reusableConfigs. */ + public reusableConfigs: google.cloud.security.privateca.v1beta1.IReusableConfig[]; + + /** ListReusableConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListReusableConfigsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListReusableConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListReusableConfigsResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse): google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; + + /** + * Encodes the specified ListReusableConfigsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.verify|verify} messages. + * @param message ListReusableConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListReusableConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.verify|verify} messages. + * @param message ListReusableConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListReusableConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListReusableConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; + + /** + * Decodes a ListReusableConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListReusableConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; + + /** + * Verifies a ListReusableConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListReusableConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListReusableConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse; + + /** + * Creates a plain object from a ListReusableConfigsResponse message. Also converts values to other types if specified. + * @param message ListReusableConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListReusableConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateReusableConfigRequest. */ + interface IUpdateReusableConfigRequest { + + /** UpdateReusableConfigRequest reusableConfig */ + reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); + + /** UpdateReusableConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReusableConfigRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateReusableConfigRequest. */ + class UpdateReusableConfigRequest implements IUpdateReusableConfigRequest { + + /** + * Constructs a new UpdateReusableConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest); + + /** UpdateReusableConfigRequest reusableConfig. */ + public reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); + + /** UpdateReusableConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateReusableConfigRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateReusableConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateReusableConfigRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; + + /** + * Encodes the specified UpdateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. + * @param message UpdateReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. + * @param message UpdateReusableConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; + + /** + * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; + + /** + * Verifies an UpdateReusableConfigRequest message. + * @param message Plain 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 UpdateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateReusableConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; + + /** + * Creates a plain object from an UpdateReusableConfigRequest message. Also converts values to other types if specified. + * @param message UpdateReusableConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateReusableConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.IOperationMetadata): google.cloud.security.privateca.v1beta1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata 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); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|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 a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not 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.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload 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.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not 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.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload 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.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not 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.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload 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.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain 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 Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not 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.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload 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.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not 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.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload 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.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain 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 Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not 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.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload 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.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not 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.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload 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.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not 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.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload 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.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not 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.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload 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.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + 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 { + } + + /** 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 }; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace longrunning. */ + namespace longrunning { + + /** Represents an Operations */ + class Operations extends $protobuf.rpc.Service { + + /** + * Constructs a new Operations 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 Operations 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): Operations; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOperationsResponse + */ + public listOperations(request: google.longrunning.IListOperationsRequest, callback: google.longrunning.Operations.ListOperationsCallback): void; + + /** + * Calls ListOperations. + * @param request ListOperationsRequest message or plain object + * @returns Promise + */ + public listOperations(request: google.longrunning.IListOperationsRequest): Promise; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public getOperation(request: google.longrunning.IGetOperationRequest, callback: google.longrunning.Operations.GetOperationCallback): void; + + /** + * Calls GetOperation. + * @param request GetOperationRequest message or plain object + * @returns Promise + */ + public getOperation(request: google.longrunning.IGetOperationRequest): Promise; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest, callback: google.longrunning.Operations.DeleteOperationCallback): void; + + /** + * Calls DeleteOperation. + * @param request DeleteOperationRequest message or plain object + * @returns Promise + */ + public deleteOperation(request: google.longrunning.IDeleteOperationRequest): Promise; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest, callback: google.longrunning.Operations.CancelOperationCallback): void; + + /** + * Calls CancelOperation. + * @param request CancelOperationRequest message or plain object + * @returns Promise + */ + public cancelOperation(request: google.longrunning.ICancelOperationRequest): Promise; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest, callback: google.longrunning.Operations.WaitOperationCallback): void; + + /** + * Calls WaitOperation. + * @param request WaitOperationRequest message or plain object + * @returns Promise + */ + public waitOperation(request: google.longrunning.IWaitOperationRequest): Promise; + } + + namespace Operations { + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @param error Error, if any + * @param [response] ListOperationsResponse + */ + type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @param error Error, if any + * @param [response] Operation + */ + type WaitOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of an Operation. */ + interface IOperation { + + /** Operation name */ + name?: (string|null); + + /** Operation metadata */ + metadata?: (google.protobuf.IAny|null); + + /** Operation done */ + done?: (boolean|null); + + /** Operation error */ + error?: (google.rpc.IStatus|null); + + /** Operation response */ + response?: (google.protobuf.IAny|null); + } + + /** Represents an Operation. */ + class Operation implements IOperation { + + /** + * Constructs a new Operation. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperation); + + /** Operation name. */ + public name: string; + + /** Operation metadata. */ + public metadata?: (google.protobuf.IAny|null); + + /** Operation done. */ + public done: boolean; + + /** Operation error. */ + public error?: (google.rpc.IStatus|null); + + /** Operation response. */ + public response?: (google.protobuf.IAny|null); + + /** Operation result. */ + public result?: ("error"|"response"); + + /** + * Creates a new Operation instance using the specified properties. + * @param [properties] Properties to set + * @returns Operation instance + */ + public static create(properties?: google.longrunning.IOperation): google.longrunning.Operation; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @param message Operation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.Operation; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.Operation; + + /** + * Verifies an Operation message. + * @param message Plain 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 Operation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Operation + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.Operation; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @param message Operation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.Operation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Operation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetOperationRequest. */ + interface IGetOperationRequest { + + /** GetOperationRequest name */ + name?: (string|null); + } + + /** Represents a GetOperationRequest. */ + class GetOperationRequest implements IGetOperationRequest { + + /** + * Constructs a new GetOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IGetOperationRequest); + + /** GetOperationRequest name. */ + public name: string; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOperationRequest instance + */ + public static create(properties?: google.longrunning.IGetOperationRequest): google.longrunning.GetOperationRequest; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @param message GetOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IGetOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.GetOperationRequest; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.GetOperationRequest; + + /** + * Verifies a GetOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.GetOperationRequest; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @param message GetOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.GetOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsRequest. */ + interface IListOperationsRequest { + + /** ListOperationsRequest name */ + name?: (string|null); + + /** ListOperationsRequest filter */ + filter?: (string|null); + + /** ListOperationsRequest pageSize */ + pageSize?: (number|null); + + /** ListOperationsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListOperationsRequest. */ + class ListOperationsRequest implements IListOperationsRequest { + + /** + * Constructs a new ListOperationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsRequest); + + /** ListOperationsRequest name. */ + public name: string; + + /** ListOperationsRequest filter. */ + public filter: string; + + /** ListOperationsRequest pageSize. */ + public pageSize: number; + + /** ListOperationsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsRequest instance + */ + public static create(properties?: google.longrunning.IListOperationsRequest): google.longrunning.ListOperationsRequest; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @param message ListOperationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsRequest; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsRequest; + + /** + * Verifies a ListOperationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsRequest; + + /** + * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified. + * @param message ListOperationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListOperationsResponse. */ + interface IListOperationsResponse { + + /** ListOperationsResponse operations */ + operations?: (google.longrunning.IOperation[]|null); + + /** ListOperationsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListOperationsResponse. */ + class ListOperationsResponse implements IListOperationsResponse { + + /** + * Constructs a new ListOperationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IListOperationsResponse); + + /** ListOperationsResponse operations. */ + public operations: google.longrunning.IOperation[]; + + /** ListOperationsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOperationsResponse instance + */ + public static create(properties?: google.longrunning.IListOperationsResponse): google.longrunning.ListOperationsResponse; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @param message ListOperationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IListOperationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.ListOperationsResponse; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.ListOperationsResponse; + + /** + * Verifies a ListOperationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOperationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.ListOperationsResponse; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @param message ListOperationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.ListOperationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOperationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelOperationRequest. */ + interface ICancelOperationRequest { + + /** CancelOperationRequest name */ + name?: (string|null); + } + + /** Represents a CancelOperationRequest. */ + class CancelOperationRequest implements ICancelOperationRequest { + + /** + * Constructs a new CancelOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.ICancelOperationRequest); + + /** CancelOperationRequest name. */ + public name: string; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOperationRequest instance + */ + public static create(properties?: google.longrunning.ICancelOperationRequest): google.longrunning.CancelOperationRequest; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @param message CancelOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.ICancelOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.CancelOperationRequest; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.CancelOperationRequest; + + /** + * Verifies a CancelOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.CancelOperationRequest; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @param message CancelOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.CancelOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteOperationRequest. */ + interface IDeleteOperationRequest { + + /** DeleteOperationRequest name */ + name?: (string|null); + } + + /** Represents a DeleteOperationRequest. */ + class DeleteOperationRequest implements IDeleteOperationRequest { + + /** + * Constructs a new DeleteOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IDeleteOperationRequest); + + /** DeleteOperationRequest name. */ + public name: string; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteOperationRequest instance + */ + public static create(properties?: google.longrunning.IDeleteOperationRequest): google.longrunning.DeleteOperationRequest; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @param message DeleteOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IDeleteOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.DeleteOperationRequest; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.DeleteOperationRequest; + + /** + * Verifies a DeleteOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.DeleteOperationRequest; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @param message DeleteOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.DeleteOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a WaitOperationRequest. */ + interface IWaitOperationRequest { + + /** WaitOperationRequest name */ + name?: (string|null); + + /** WaitOperationRequest timeout */ + timeout?: (google.protobuf.IDuration|null); + } + + /** Represents a WaitOperationRequest. */ + class WaitOperationRequest implements IWaitOperationRequest { + + /** + * Constructs a new WaitOperationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IWaitOperationRequest); + + /** WaitOperationRequest name. */ + public name: string; + + /** WaitOperationRequest timeout. */ + public timeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns WaitOperationRequest instance + */ + public static create(properties?: google.longrunning.IWaitOperationRequest): google.longrunning.WaitOperationRequest; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @param message WaitOperationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IWaitOperationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.WaitOperationRequest; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.WaitOperationRequest; + + /** + * Verifies a WaitOperationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WaitOperationRequest + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.WaitOperationRequest; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @param message WaitOperationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.WaitOperationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WaitOperationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationInfo. */ + interface IOperationInfo { + + /** OperationInfo responseType */ + responseType?: (string|null); + + /** OperationInfo metadataType */ + metadataType?: (string|null); + } + + /** Represents an OperationInfo. */ + class OperationInfo implements IOperationInfo { + + /** + * Constructs a new OperationInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.longrunning.IOperationInfo); + + /** OperationInfo responseType. */ + public responseType: string; + + /** OperationInfo metadataType. */ + public metadataType: string; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationInfo instance + */ + public static create(properties?: google.longrunning.IOperationInfo): google.longrunning.OperationInfo; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @param message OperationInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.longrunning.IOperationInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.longrunning.OperationInfo; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.longrunning.OperationInfo; + + /** + * Verifies an OperationInfo message. + * @param message Plain 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 OperationInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationInfo + */ + public static fromObject(object: { [k: string]: any }): google.longrunning.OperationInfo; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @param message OperationInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.longrunning.OperationInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationInfo to JSON. + * @returns JSON object + */ + 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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js new file mode 100644 index 00000000000..f47680ac9d3 --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -0,0 +1,33177 @@ +// 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.privateca_protos || ($protobuf.roots.privateca_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.security = (function() { + + /** + * Namespace security. + * @memberof google.cloud + * @namespace + */ + var security = {}; + + security.privateca = (function() { + + /** + * Namespace privateca. + * @memberof google.cloud.security + * @namespace + */ + var privateca = {}; + + privateca.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.security.privateca + * @namespace + */ + var v1beta1 = {}; + + v1beta1.CertificateAuthority = (function() { + + /** + * Properties of a CertificateAuthority. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICertificateAuthority + * @property {string|null} [name] CertificateAuthority name + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|null} [type] CertificateAuthority type + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|null} [tier] CertificateAuthority tier + * @property {google.cloud.security.privateca.v1beta1.ICertificateConfig|null} [config] CertificateAuthority config + * @property {google.protobuf.IDuration|null} [lifetime] CertificateAuthority lifetime + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null} [keySpec] CertificateAuthority keySpec + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null} [certificatePolicy] CertificateAuthority certificatePolicy + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null} [issuingOptions] CertificateAuthority issuingOptions + * @property {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null} [subordinateConfig] CertificateAuthority subordinateConfig + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.State|null} [state] CertificateAuthority state + * @property {Array.|null} [pemCaCertificates] CertificateAuthority pemCaCertificates + * @property {Array.|null} [caCertificateDescriptions] CertificateAuthority caCertificateDescriptions + * @property {string|null} [gcsBucket] CertificateAuthority gcsBucket + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null} [accessUrls] CertificateAuthority accessUrls + * @property {google.protobuf.ITimestamp|null} [createTime] CertificateAuthority createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CertificateAuthority updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] CertificateAuthority deleteTime + * @property {Object.|null} [labels] CertificateAuthority labels + */ + + /** + * Constructs a new CertificateAuthority. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CertificateAuthority. + * @implements ICertificateAuthority + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority=} [properties] Properties to set + */ + function CertificateAuthority(properties) { + this.pemCaCertificates = []; + this.caCertificateDescriptions = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateAuthority name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.name = ""; + + /** + * CertificateAuthority type. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.Type} type + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.type = 0; + + /** + * CertificateAuthority tier. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier} tier + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.tier = 0; + + /** + * CertificateAuthority config. + * @member {google.cloud.security.privateca.v1beta1.ICertificateConfig|null|undefined} config + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.config = null; + + /** + * CertificateAuthority lifetime. + * @member {google.protobuf.IDuration|null|undefined} lifetime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.lifetime = null; + + /** + * CertificateAuthority keySpec. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null|undefined} keySpec + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.keySpec = null; + + /** + * CertificateAuthority certificatePolicy. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null|undefined} certificatePolicy + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.certificatePolicy = null; + + /** + * CertificateAuthority issuingOptions. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null|undefined} issuingOptions + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.issuingOptions = null; + + /** + * CertificateAuthority subordinateConfig. + * @member {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.subordinateConfig = null; + + /** + * CertificateAuthority state. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.State} state + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.state = 0; + + /** + * CertificateAuthority pemCaCertificates. + * @member {Array.} pemCaCertificates + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.pemCaCertificates = $util.emptyArray; + + /** + * CertificateAuthority caCertificateDescriptions. + * @member {Array.} caCertificateDescriptions + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.caCertificateDescriptions = $util.emptyArray; + + /** + * CertificateAuthority gcsBucket. + * @member {string} gcsBucket + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.gcsBucket = ""; + + /** + * CertificateAuthority accessUrls. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null|undefined} accessUrls + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.accessUrls = null; + + /** + * CertificateAuthority createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.createTime = null; + + /** + * CertificateAuthority updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.updateTime = null; + + /** + * CertificateAuthority deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.deleteTime = null; + + /** + * CertificateAuthority labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.labels = $util.emptyObject; + + /** + * Creates a new CertificateAuthority instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority instance + */ + CertificateAuthority.create = function create(properties) { + return new CertificateAuthority(properties); + }; + + /** + * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority} message CertificateAuthority message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthority.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tier); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.security.privateca.v1beta1.CertificateConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.keySpec != null && Object.hasOwnProperty.call(message, "keySpec")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.encode(message.keySpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.certificatePolicy != null && Object.hasOwnProperty.call(message, "certificatePolicy")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.encode(message.certificatePolicy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.issuingOptions != null && Object.hasOwnProperty.call(message, "issuingOptions")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.encode(message.issuingOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.pemCaCertificates != null && message.pemCaCertificates.length) + for (var i = 0; i < message.pemCaCertificates.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pemCaCertificates[i]); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.caCertificateDescriptions != null && message.caCertificateDescriptions.length) + for (var i = 0; i < message.caCertificateDescriptions.length; ++i) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.encode(message.caCertificateDescriptions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.gcsBucket); + if (message.accessUrls != null && Object.hasOwnProperty.call(message, "accessUrls")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.encode(message.accessUrls, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 17, wireType 2 =*/138).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 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.subordinateConfig != null && Object.hasOwnProperty.call(message, "subordinateConfig")) + $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.encode(message.subordinateConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority} message CertificateAuthority message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthority.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthority.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + message.tier = reader.int32(); + break; + case 4: + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); + break; + case 5: + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); + break; + case 7: + message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.decode(reader, reader.uint32()); + break; + case 8: + message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.decode(reader, reader.uint32()); + break; + case 19: + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); + break; + case 10: + message.state = reader.int32(); + break; + case 9: + if (!(message.pemCaCertificates && message.pemCaCertificates.length)) + message.pemCaCertificates = []; + message.pemCaCertificates.push(reader.string()); + break; + case 12: + if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) + message.caCertificateDescriptions = []; + message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32())); + break; + case 13: + message.gcsBucket = reader.string(); + break; + case 14: + message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); + break; + case 15: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 16: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 18: + 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; + } + } + return message; + }; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthority.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateAuthority message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateAuthority.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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tier != null && message.hasOwnProperty("tier")) + switch (message.tier) { + default: + return "tier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.lifetime != null && message.hasOwnProperty("lifetime")) { + var error = $root.google.protobuf.Duration.verify(message.lifetime); + if (error) + return "lifetime." + error; + } + if (message.keySpec != null && message.hasOwnProperty("keySpec")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify(message.keySpec); + if (error) + return "keySpec." + error; + } + if (message.certificatePolicy != null && message.hasOwnProperty("certificatePolicy")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify(message.certificatePolicy); + if (error) + return "certificatePolicy." + error; + } + if (message.issuingOptions != null && message.hasOwnProperty("issuingOptions")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify(message.issuingOptions); + if (error) + return "issuingOptions." + error; + } + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.verify(message.subordinateConfig); + if (error) + return "subordinateConfig." + 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.pemCaCertificates != null && message.hasOwnProperty("pemCaCertificates")) { + if (!Array.isArray(message.pemCaCertificates)) + return "pemCaCertificates: array expected"; + for (var i = 0; i < message.pemCaCertificates.length; ++i) + if (!$util.isString(message.pemCaCertificates[i])) + return "pemCaCertificates: string[] expected"; + } + if (message.caCertificateDescriptions != null && message.hasOwnProperty("caCertificateDescriptions")) { + if (!Array.isArray(message.caCertificateDescriptions)) + return "caCertificateDescriptions: array expected"; + for (var i = 0; i < message.caCertificateDescriptions.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.verify(message.caCertificateDescriptions[i]); + if (error) + return "caCertificateDescriptions." + error; + } + } + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) + if (!$util.isString(message.gcsBucket)) + return "gcsBucket: string expected"; + if (message.accessUrls != null && message.hasOwnProperty("accessUrls")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify(message.accessUrls); + if (error) + return "accessUrls." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + 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; + }; + + /** + * Creates a CertificateAuthority message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + */ + CertificateAuthority.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SELF_SIGNED": + case 1: + message.type = 1; + break; + case "SUBORDINATE": + case 2: + message.type = 2; + break; + } + switch (object.tier) { + case "TIER_UNSPECIFIED": + case 0: + message.tier = 0; + break; + case "ENTERPRISE": + case 1: + message.tier = 1; + break; + case "DEVOPS": + case 2: + message.tier = 2; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.config: object expected"); + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.fromObject(object.config); + } + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.keySpec != null) { + if (typeof object.keySpec !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.keySpec: object expected"); + message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.fromObject(object.keySpec); + } + if (object.certificatePolicy != null) { + if (typeof object.certificatePolicy !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.certificatePolicy: object expected"); + message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.fromObject(object.certificatePolicy); + } + if (object.issuingOptions != null) { + if (typeof object.issuingOptions !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.issuingOptions: object expected"); + message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.fromObject(object.issuingOptions); + } + if (object.subordinateConfig != null) { + if (typeof object.subordinateConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.subordinateConfig: object expected"); + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.fromObject(object.subordinateConfig); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ENABLED": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + case "PENDING_ACTIVATION": + case 3: + message.state = 3; + break; + case "PENDING_DELETION": + case 4: + message.state = 4; + break; + } + if (object.pemCaCertificates) { + if (!Array.isArray(object.pemCaCertificates)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.pemCaCertificates: array expected"); + message.pemCaCertificates = []; + for (var i = 0; i < object.pemCaCertificates.length; ++i) + message.pemCaCertificates[i] = String(object.pemCaCertificates[i]); + } + if (object.caCertificateDescriptions) { + if (!Array.isArray(object.caCertificateDescriptions)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.caCertificateDescriptions: array expected"); + message.caCertificateDescriptions = []; + for (var i = 0; i < object.caCertificateDescriptions.length; ++i) { + if (typeof object.caCertificateDescriptions[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.caCertificateDescriptions: object expected"); + message.caCertificateDescriptions[i] = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.fromObject(object.caCertificateDescriptions[i]); + } + } + if (object.gcsBucket != null) + message.gcsBucket = String(object.gcsBucket); + if (object.accessUrls != null) { + if (typeof object.accessUrls !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.accessUrls: object expected"); + message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.fromObject(object.accessUrls); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.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; + }; + + /** + * Creates a plain object from a CertificateAuthority message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} message CertificateAuthority + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateAuthority.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pemCaCertificates = []; + object.caCertificateDescriptions = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; + object.config = null; + object.lifetime = null; + object.keySpec = null; + object.certificatePolicy = null; + object.issuingOptions = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.gcsBucket = ""; + object.accessUrls = null; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.subordinateConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type[message.type] : message.type; + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier[message.tier] : message.tier; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.toObject(message.config, options); + if (message.lifetime != null && message.hasOwnProperty("lifetime")) + object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); + if (message.keySpec != null && message.hasOwnProperty("keySpec")) + object.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.toObject(message.keySpec, options); + if (message.certificatePolicy != null && message.hasOwnProperty("certificatePolicy")) + object.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.toObject(message.certificatePolicy, options); + if (message.issuingOptions != null && message.hasOwnProperty("issuingOptions")) + object.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.toObject(message.issuingOptions, options); + if (message.pemCaCertificates && message.pemCaCertificates.length) { + object.pemCaCertificates = []; + for (var j = 0; j < message.pemCaCertificates.length; ++j) + object.pemCaCertificates[j] = message.pemCaCertificates[j]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.State[message.state] : message.state; + if (message.caCertificateDescriptions && message.caCertificateDescriptions.length) { + object.caCertificateDescriptions = []; + for (var j = 0; j < message.caCertificateDescriptions.length; ++j) + object.caCertificateDescriptions[j] = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.toObject(message.caCertificateDescriptions[j], options); + } + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) + object.gcsBucket = message.gcsBucket; + if (message.accessUrls != null && message.hasOwnProperty("accessUrls")) + object.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.toObject(message.accessUrls, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, 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]]; + } + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) + object.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.toObject(message.subordinateConfig, options); + return object; + }; + + /** + * Converts this CertificateAuthority to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + * @returns {Object.} JSON object + */ + CertificateAuthority.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateAuthority.IssuingOptions = (function() { + + /** + * Properties of an IssuingOptions. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @interface IIssuingOptions + * @property {boolean|null} [includeCaCertUrl] IssuingOptions includeCaCertUrl + * @property {boolean|null} [includeCrlAccessUrl] IssuingOptions includeCrlAccessUrl + */ + + /** + * Constructs a new IssuingOptions. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @classdesc Represents an IssuingOptions. + * @implements IIssuingOptions + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions=} [properties] Properties to set + */ + function IssuingOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssuingOptions includeCaCertUrl. + * @member {boolean} includeCaCertUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @instance + */ + IssuingOptions.prototype.includeCaCertUrl = false; + + /** + * IssuingOptions includeCrlAccessUrl. + * @member {boolean} includeCrlAccessUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @instance + */ + IssuingOptions.prototype.includeCrlAccessUrl = false; + + /** + * Creates a new IssuingOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions instance + */ + IssuingOptions.create = function create(properties) { + return new IssuingOptions(properties); + }; + + /** + * Encodes the specified IssuingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions} message IssuingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuingOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeCaCertUrl != null && Object.hasOwnProperty.call(message, "includeCaCertUrl")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeCaCertUrl); + if (message.includeCrlAccessUrl != null && Object.hasOwnProperty.call(message, "includeCrlAccessUrl")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeCrlAccessUrl); + return writer; + }; + + /** + * Encodes the specified IssuingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions} message IssuingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuingOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuingOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.includeCaCertUrl = reader.bool(); + break; + case 2: + message.includeCrlAccessUrl = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuingOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssuingOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssuingOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includeCaCertUrl != null && message.hasOwnProperty("includeCaCertUrl")) + if (typeof message.includeCaCertUrl !== "boolean") + return "includeCaCertUrl: boolean expected"; + if (message.includeCrlAccessUrl != null && message.hasOwnProperty("includeCrlAccessUrl")) + if (typeof message.includeCrlAccessUrl !== "boolean") + return "includeCrlAccessUrl: boolean expected"; + return null; + }; + + /** + * Creates an IssuingOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + */ + IssuingOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); + if (object.includeCaCertUrl != null) + message.includeCaCertUrl = Boolean(object.includeCaCertUrl); + if (object.includeCrlAccessUrl != null) + message.includeCrlAccessUrl = Boolean(object.includeCrlAccessUrl); + return message; + }; + + /** + * Creates a plain object from an IssuingOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} message IssuingOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssuingOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.includeCaCertUrl = false; + object.includeCrlAccessUrl = false; + } + if (message.includeCaCertUrl != null && message.hasOwnProperty("includeCaCertUrl")) + object.includeCaCertUrl = message.includeCaCertUrl; + if (message.includeCrlAccessUrl != null && message.hasOwnProperty("includeCrlAccessUrl")) + object.includeCrlAccessUrl = message.includeCrlAccessUrl; + return object; + }; + + /** + * Converts this IssuingOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @instance + * @returns {Object.} JSON object + */ + IssuingOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IssuingOptions; + })(); + + CertificateAuthority.CertificateAuthorityPolicy = (function() { + + /** + * Properties of a CertificateAuthorityPolicy. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @interface ICertificateAuthorityPolicy + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null} [allowedConfigList] CertificateAuthorityPolicy allowedConfigList + * @property {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null} [overwriteConfigValues] CertificateAuthorityPolicy overwriteConfigValues + * @property {Array.|null} [allowedLocationsAndOrganizations] CertificateAuthorityPolicy allowedLocationsAndOrganizations + * @property {Array.|null} [allowedCommonNames] CertificateAuthorityPolicy allowedCommonNames + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null} [allowedSans] CertificateAuthorityPolicy allowedSans + * @property {google.protobuf.IDuration|null} [maximumLifetime] CertificateAuthorityPolicy maximumLifetime + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null} [allowedIssuanceModes] CertificateAuthorityPolicy allowedIssuanceModes + */ + + /** + * Constructs a new CertificateAuthorityPolicy. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @classdesc Represents a CertificateAuthorityPolicy. + * @implements ICertificateAuthorityPolicy + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy=} [properties] Properties to set + */ + function CertificateAuthorityPolicy(properties) { + this.allowedLocationsAndOrganizations = []; + this.allowedCommonNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateAuthorityPolicy allowedConfigList. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null|undefined} allowedConfigList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedConfigList = null; + + /** + * CertificateAuthorityPolicy overwriteConfigValues. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null|undefined} overwriteConfigValues + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.overwriteConfigValues = null; + + /** + * CertificateAuthorityPolicy allowedLocationsAndOrganizations. + * @member {Array.} allowedLocationsAndOrganizations + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedLocationsAndOrganizations = $util.emptyArray; + + /** + * CertificateAuthorityPolicy allowedCommonNames. + * @member {Array.} allowedCommonNames + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedCommonNames = $util.emptyArray; + + /** + * CertificateAuthorityPolicy allowedSans. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null|undefined} allowedSans + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedSans = null; + + /** + * CertificateAuthorityPolicy maximumLifetime. + * @member {google.protobuf.IDuration|null|undefined} maximumLifetime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.maximumLifetime = null; + + /** + * CertificateAuthorityPolicy allowedIssuanceModes. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null|undefined} allowedIssuanceModes + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedIssuanceModes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CertificateAuthorityPolicy configPolicy. + * @member {"allowedConfigList"|"overwriteConfigValues"|undefined} configPolicy + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + Object.defineProperty(CertificateAuthorityPolicy.prototype, "configPolicy", { + get: $util.oneOfGetter($oneOfFields = ["allowedConfigList", "overwriteConfigValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CertificateAuthorityPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} CertificateAuthorityPolicy instance + */ + CertificateAuthorityPolicy.create = function create(properties) { + return new CertificateAuthorityPolicy(properties); + }; + + /** + * Encodes the specified CertificateAuthorityPolicy message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy} message CertificateAuthorityPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedConfigList != null && Object.hasOwnProperty.call(message, "allowedConfigList")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.encode(message.allowedConfigList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.overwriteConfigValues != null && Object.hasOwnProperty.call(message, "overwriteConfigValues")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.encode(message.overwriteConfigValues, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedLocationsAndOrganizations != null && message.allowedLocationsAndOrganizations.length) + for (var i = 0; i < message.allowedLocationsAndOrganizations.length; ++i) + $root.google.cloud.security.privateca.v1beta1.Subject.encode(message.allowedLocationsAndOrganizations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.allowedCommonNames != null && message.allowedCommonNames.length) + for (var i = 0; i < message.allowedCommonNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedCommonNames[i]); + if (message.allowedSans != null && Object.hasOwnProperty.call(message, "allowedSans")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.encode(message.allowedSans, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.maximumLifetime != null && Object.hasOwnProperty.call(message, "maximumLifetime")) + $root.google.protobuf.Duration.encode(message.maximumLifetime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.allowedIssuanceModes != null && Object.hasOwnProperty.call(message, "allowedIssuanceModes")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.encode(message.allowedIssuanceModes, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateAuthorityPolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy} message CertificateAuthorityPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} CertificateAuthorityPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthorityPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.allowedConfigList = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.decode(reader, reader.uint32()); + break; + case 2: + message.overwriteConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.allowedLocationsAndOrganizations && message.allowedLocationsAndOrganizations.length)) + message.allowedLocationsAndOrganizations = []; + message.allowedLocationsAndOrganizations.push($root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.allowedCommonNames && message.allowedCommonNames.length)) + message.allowedCommonNames = []; + message.allowedCommonNames.push(reader.string()); + break; + case 5: + message.allowedSans = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.decode(reader, reader.uint32()); + break; + case 6: + message.maximumLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 8: + message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} CertificateAuthorityPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthorityPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateAuthorityPolicy message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateAuthorityPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.allowedConfigList != null && message.hasOwnProperty("allowedConfigList")) { + properties.configPolicy = 1; + { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify(message.allowedConfigList); + if (error) + return "allowedConfigList." + error; + } + } + if (message.overwriteConfigValues != null && message.hasOwnProperty("overwriteConfigValues")) { + if (properties.configPolicy === 1) + return "configPolicy: multiple values"; + properties.configPolicy = 1; + { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify(message.overwriteConfigValues); + if (error) + return "overwriteConfigValues." + error; + } + } + if (message.allowedLocationsAndOrganizations != null && message.hasOwnProperty("allowedLocationsAndOrganizations")) { + if (!Array.isArray(message.allowedLocationsAndOrganizations)) + return "allowedLocationsAndOrganizations: array expected"; + for (var i = 0; i < message.allowedLocationsAndOrganizations.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.Subject.verify(message.allowedLocationsAndOrganizations[i]); + if (error) + return "allowedLocationsAndOrganizations." + error; + } + } + if (message.allowedCommonNames != null && message.hasOwnProperty("allowedCommonNames")) { + if (!Array.isArray(message.allowedCommonNames)) + return "allowedCommonNames: array expected"; + for (var i = 0; i < message.allowedCommonNames.length; ++i) + if (!$util.isString(message.allowedCommonNames[i])) + return "allowedCommonNames: string[] expected"; + } + if (message.allowedSans != null && message.hasOwnProperty("allowedSans")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.verify(message.allowedSans); + if (error) + return "allowedSans." + error; + } + if (message.maximumLifetime != null && message.hasOwnProperty("maximumLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maximumLifetime); + if (error) + return "maximumLifetime." + error; + } + if (message.allowedIssuanceModes != null && message.hasOwnProperty("allowedIssuanceModes")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.verify(message.allowedIssuanceModes); + if (error) + return "allowedIssuanceModes." + error; + } + return null; + }; + + /** + * Creates a CertificateAuthorityPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} CertificateAuthorityPolicy + */ + CertificateAuthorityPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy(); + if (object.allowedConfigList != null) { + if (typeof object.allowedConfigList !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.allowedConfigList: object expected"); + message.allowedConfigList = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.fromObject(object.allowedConfigList); + } + if (object.overwriteConfigValues != null) { + if (typeof object.overwriteConfigValues !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.overwriteConfigValues: object expected"); + message.overwriteConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.fromObject(object.overwriteConfigValues); + } + if (object.allowedLocationsAndOrganizations) { + if (!Array.isArray(object.allowedLocationsAndOrganizations)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.allowedLocationsAndOrganizations: array expected"); + message.allowedLocationsAndOrganizations = []; + for (var i = 0; i < object.allowedLocationsAndOrganizations.length; ++i) { + if (typeof object.allowedLocationsAndOrganizations[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.allowedLocationsAndOrganizations: object expected"); + message.allowedLocationsAndOrganizations[i] = $root.google.cloud.security.privateca.v1beta1.Subject.fromObject(object.allowedLocationsAndOrganizations[i]); + } + } + if (object.allowedCommonNames) { + if (!Array.isArray(object.allowedCommonNames)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.allowedCommonNames: array expected"); + message.allowedCommonNames = []; + for (var i = 0; i < object.allowedCommonNames.length; ++i) + message.allowedCommonNames[i] = String(object.allowedCommonNames[i]); + } + if (object.allowedSans != null) { + if (typeof object.allowedSans !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.allowedSans: object expected"); + message.allowedSans = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.fromObject(object.allowedSans); + } + if (object.maximumLifetime != null) { + if (typeof object.maximumLifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.maximumLifetime: object expected"); + message.maximumLifetime = $root.google.protobuf.Duration.fromObject(object.maximumLifetime); + } + if (object.allowedIssuanceModes != null) { + if (typeof object.allowedIssuanceModes !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.allowedIssuanceModes: object expected"); + message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.fromObject(object.allowedIssuanceModes); + } + return message; + }; + + /** + * Creates a plain object from a CertificateAuthorityPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} message CertificateAuthorityPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateAuthorityPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.allowedLocationsAndOrganizations = []; + object.allowedCommonNames = []; + } + if (options.defaults) { + object.allowedSans = null; + object.maximumLifetime = null; + object.allowedIssuanceModes = null; + } + if (message.allowedConfigList != null && message.hasOwnProperty("allowedConfigList")) { + object.allowedConfigList = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.toObject(message.allowedConfigList, options); + if (options.oneofs) + object.configPolicy = "allowedConfigList"; + } + if (message.overwriteConfigValues != null && message.hasOwnProperty("overwriteConfigValues")) { + object.overwriteConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.toObject(message.overwriteConfigValues, options); + if (options.oneofs) + object.configPolicy = "overwriteConfigValues"; + } + if (message.allowedLocationsAndOrganizations && message.allowedLocationsAndOrganizations.length) { + object.allowedLocationsAndOrganizations = []; + for (var j = 0; j < message.allowedLocationsAndOrganizations.length; ++j) + object.allowedLocationsAndOrganizations[j] = $root.google.cloud.security.privateca.v1beta1.Subject.toObject(message.allowedLocationsAndOrganizations[j], options); + } + if (message.allowedCommonNames && message.allowedCommonNames.length) { + object.allowedCommonNames = []; + for (var j = 0; j < message.allowedCommonNames.length; ++j) + object.allowedCommonNames[j] = message.allowedCommonNames[j]; + } + if (message.allowedSans != null && message.hasOwnProperty("allowedSans")) + object.allowedSans = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.toObject(message.allowedSans, options); + if (message.maximumLifetime != null && message.hasOwnProperty("maximumLifetime")) + object.maximumLifetime = $root.google.protobuf.Duration.toObject(message.maximumLifetime, options); + if (message.allowedIssuanceModes != null && message.hasOwnProperty("allowedIssuanceModes")) + object.allowedIssuanceModes = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.toObject(message.allowedIssuanceModes, options); + return object; + }; + + /** + * Converts this CertificateAuthorityPolicy to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + * @returns {Object.} JSON object + */ + CertificateAuthorityPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateAuthorityPolicy.AllowedConfigList = (function() { + + /** + * Properties of an AllowedConfigList. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @interface IAllowedConfigList + * @property {Array.|null} [allowedConfigValues] AllowedConfigList allowedConfigValues + */ + + /** + * Constructs a new AllowedConfigList. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @classdesc Represents an AllowedConfigList. + * @implements IAllowedConfigList + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList=} [properties] Properties to set + */ + function AllowedConfigList(properties) { + this.allowedConfigValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedConfigList allowedConfigValues. + * @member {Array.} allowedConfigValues + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @instance + */ + AllowedConfigList.prototype.allowedConfigValues = $util.emptyArray; + + /** + * Creates a new AllowedConfigList instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} AllowedConfigList instance + */ + AllowedConfigList.create = function create(properties) { + return new AllowedConfigList(properties); + }; + + /** + * Encodes the specified AllowedConfigList message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList} message AllowedConfigList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedConfigList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedConfigValues != null && message.allowedConfigValues.length) + for (var i = 0; i < message.allowedConfigValues.length; ++i) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.encode(message.allowedConfigValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AllowedConfigList message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList} message AllowedConfigList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedConfigList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedConfigList message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} AllowedConfigList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedConfigList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedConfigValues && message.allowedConfigValues.length)) + message.allowedConfigValues = []; + message.allowedConfigValues.push($root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedConfigList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} AllowedConfigList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedConfigList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedConfigList message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedConfigList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedConfigValues != null && message.hasOwnProperty("allowedConfigValues")) { + if (!Array.isArray(message.allowedConfigValues)) + return "allowedConfigValues: array expected"; + for (var i = 0; i < message.allowedConfigValues.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify(message.allowedConfigValues[i]); + if (error) + return "allowedConfigValues." + error; + } + } + return null; + }; + + /** + * Creates an AllowedConfigList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} AllowedConfigList + */ + AllowedConfigList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList(); + if (object.allowedConfigValues) { + if (!Array.isArray(object.allowedConfigValues)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.allowedConfigValues: array expected"); + message.allowedConfigValues = []; + for (var i = 0; i < object.allowedConfigValues.length; ++i) { + if (typeof object.allowedConfigValues[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.allowedConfigValues: object expected"); + message.allowedConfigValues[i] = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.fromObject(object.allowedConfigValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AllowedConfigList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList} message AllowedConfigList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedConfigList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedConfigValues = []; + if (message.allowedConfigValues && message.allowedConfigValues.length) { + object.allowedConfigValues = []; + for (var j = 0; j < message.allowedConfigValues.length; ++j) + object.allowedConfigValues[j] = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.toObject(message.allowedConfigValues[j], options); + } + return object; + }; + + /** + * Converts this AllowedConfigList to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @instance + * @returns {Object.} JSON object + */ + AllowedConfigList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AllowedConfigList; + })(); + + CertificateAuthorityPolicy.AllowedSubjectAltNames = (function() { + + /** + * Properties of an AllowedSubjectAltNames. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @interface IAllowedSubjectAltNames + * @property {Array.|null} [allowedDnsNames] AllowedSubjectAltNames allowedDnsNames + * @property {Array.|null} [allowedUris] AllowedSubjectAltNames allowedUris + * @property {Array.|null} [allowedEmailAddresses] AllowedSubjectAltNames allowedEmailAddresses + * @property {Array.|null} [allowedIps] AllowedSubjectAltNames allowedIps + * @property {boolean|null} [allowGlobbingDnsWildcards] AllowedSubjectAltNames allowGlobbingDnsWildcards + * @property {boolean|null} [allowCustomSans] AllowedSubjectAltNames allowCustomSans + */ + + /** + * Constructs a new AllowedSubjectAltNames. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @classdesc Represents an AllowedSubjectAltNames. + * @implements IAllowedSubjectAltNames + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames=} [properties] Properties to set + */ + function AllowedSubjectAltNames(properties) { + this.allowedDnsNames = []; + this.allowedUris = []; + this.allowedEmailAddresses = []; + this.allowedIps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedSubjectAltNames allowedDnsNames. + * @member {Array.} allowedDnsNames + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + */ + AllowedSubjectAltNames.prototype.allowedDnsNames = $util.emptyArray; + + /** + * AllowedSubjectAltNames allowedUris. + * @member {Array.} allowedUris + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + */ + AllowedSubjectAltNames.prototype.allowedUris = $util.emptyArray; + + /** + * AllowedSubjectAltNames allowedEmailAddresses. + * @member {Array.} allowedEmailAddresses + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + */ + AllowedSubjectAltNames.prototype.allowedEmailAddresses = $util.emptyArray; + + /** + * AllowedSubjectAltNames allowedIps. + * @member {Array.} allowedIps + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + */ + AllowedSubjectAltNames.prototype.allowedIps = $util.emptyArray; + + /** + * AllowedSubjectAltNames allowGlobbingDnsWildcards. + * @member {boolean} allowGlobbingDnsWildcards + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + */ + AllowedSubjectAltNames.prototype.allowGlobbingDnsWildcards = false; + + /** + * AllowedSubjectAltNames allowCustomSans. + * @member {boolean} allowCustomSans + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + */ + AllowedSubjectAltNames.prototype.allowCustomSans = false; + + /** + * Creates a new AllowedSubjectAltNames instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} AllowedSubjectAltNames instance + */ + AllowedSubjectAltNames.create = function create(properties) { + return new AllowedSubjectAltNames(properties); + }; + + /** + * Encodes the specified AllowedSubjectAltNames message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames} message AllowedSubjectAltNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedSubjectAltNames.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedDnsNames != null && message.allowedDnsNames.length) + for (var i = 0; i < message.allowedDnsNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedDnsNames[i]); + if (message.allowedUris != null && message.allowedUris.length) + for (var i = 0; i < message.allowedUris.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.allowedUris[i]); + if (message.allowedEmailAddresses != null && message.allowedEmailAddresses.length) + for (var i = 0; i < message.allowedEmailAddresses.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.allowedEmailAddresses[i]); + if (message.allowedIps != null && message.allowedIps.length) + for (var i = 0; i < message.allowedIps.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedIps[i]); + if (message.allowGlobbingDnsWildcards != null && Object.hasOwnProperty.call(message, "allowGlobbingDnsWildcards")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allowGlobbingDnsWildcards); + if (message.allowCustomSans != null && Object.hasOwnProperty.call(message, "allowCustomSans")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.allowCustomSans); + return writer; + }; + + /** + * Encodes the specified AllowedSubjectAltNames message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames} message AllowedSubjectAltNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedSubjectAltNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedSubjectAltNames message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} AllowedSubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedSubjectAltNames.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedDnsNames && message.allowedDnsNames.length)) + message.allowedDnsNames = []; + message.allowedDnsNames.push(reader.string()); + break; + case 2: + if (!(message.allowedUris && message.allowedUris.length)) + message.allowedUris = []; + message.allowedUris.push(reader.string()); + break; + case 3: + if (!(message.allowedEmailAddresses && message.allowedEmailAddresses.length)) + message.allowedEmailAddresses = []; + message.allowedEmailAddresses.push(reader.string()); + break; + case 4: + if (!(message.allowedIps && message.allowedIps.length)) + message.allowedIps = []; + message.allowedIps.push(reader.string()); + break; + case 5: + message.allowGlobbingDnsWildcards = reader.bool(); + break; + case 6: + message.allowCustomSans = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedSubjectAltNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} AllowedSubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedSubjectAltNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedSubjectAltNames message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedSubjectAltNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedDnsNames != null && message.hasOwnProperty("allowedDnsNames")) { + if (!Array.isArray(message.allowedDnsNames)) + return "allowedDnsNames: array expected"; + for (var i = 0; i < message.allowedDnsNames.length; ++i) + if (!$util.isString(message.allowedDnsNames[i])) + return "allowedDnsNames: string[] expected"; + } + if (message.allowedUris != null && message.hasOwnProperty("allowedUris")) { + if (!Array.isArray(message.allowedUris)) + return "allowedUris: array expected"; + for (var i = 0; i < message.allowedUris.length; ++i) + if (!$util.isString(message.allowedUris[i])) + return "allowedUris: string[] expected"; + } + if (message.allowedEmailAddresses != null && message.hasOwnProperty("allowedEmailAddresses")) { + if (!Array.isArray(message.allowedEmailAddresses)) + return "allowedEmailAddresses: array expected"; + for (var i = 0; i < message.allowedEmailAddresses.length; ++i) + if (!$util.isString(message.allowedEmailAddresses[i])) + return "allowedEmailAddresses: string[] expected"; + } + if (message.allowedIps != null && message.hasOwnProperty("allowedIps")) { + if (!Array.isArray(message.allowedIps)) + return "allowedIps: array expected"; + for (var i = 0; i < message.allowedIps.length; ++i) + if (!$util.isString(message.allowedIps[i])) + return "allowedIps: string[] expected"; + } + if (message.allowGlobbingDnsWildcards != null && message.hasOwnProperty("allowGlobbingDnsWildcards")) + if (typeof message.allowGlobbingDnsWildcards !== "boolean") + return "allowGlobbingDnsWildcards: boolean expected"; + if (message.allowCustomSans != null && message.hasOwnProperty("allowCustomSans")) + if (typeof message.allowCustomSans !== "boolean") + return "allowCustomSans: boolean expected"; + return null; + }; + + /** + * Creates an AllowedSubjectAltNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} AllowedSubjectAltNames + */ + AllowedSubjectAltNames.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames(); + if (object.allowedDnsNames) { + if (!Array.isArray(object.allowedDnsNames)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowedDnsNames: array expected"); + message.allowedDnsNames = []; + for (var i = 0; i < object.allowedDnsNames.length; ++i) + message.allowedDnsNames[i] = String(object.allowedDnsNames[i]); + } + if (object.allowedUris) { + if (!Array.isArray(object.allowedUris)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowedUris: array expected"); + message.allowedUris = []; + for (var i = 0; i < object.allowedUris.length; ++i) + message.allowedUris[i] = String(object.allowedUris[i]); + } + if (object.allowedEmailAddresses) { + if (!Array.isArray(object.allowedEmailAddresses)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowedEmailAddresses: array expected"); + message.allowedEmailAddresses = []; + for (var i = 0; i < object.allowedEmailAddresses.length; ++i) + message.allowedEmailAddresses[i] = String(object.allowedEmailAddresses[i]); + } + if (object.allowedIps) { + if (!Array.isArray(object.allowedIps)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allowedIps: array expected"); + message.allowedIps = []; + for (var i = 0; i < object.allowedIps.length; ++i) + message.allowedIps[i] = String(object.allowedIps[i]); + } + if (object.allowGlobbingDnsWildcards != null) + message.allowGlobbingDnsWildcards = Boolean(object.allowGlobbingDnsWildcards); + if (object.allowCustomSans != null) + message.allowCustomSans = Boolean(object.allowCustomSans); + return message; + }; + + /** + * Creates a plain object from an AllowedSubjectAltNames message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames} message AllowedSubjectAltNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedSubjectAltNames.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.allowedDnsNames = []; + object.allowedUris = []; + object.allowedEmailAddresses = []; + object.allowedIps = []; + } + if (options.defaults) { + object.allowGlobbingDnsWildcards = false; + object.allowCustomSans = false; + } + if (message.allowedDnsNames && message.allowedDnsNames.length) { + object.allowedDnsNames = []; + for (var j = 0; j < message.allowedDnsNames.length; ++j) + object.allowedDnsNames[j] = message.allowedDnsNames[j]; + } + if (message.allowedUris && message.allowedUris.length) { + object.allowedUris = []; + for (var j = 0; j < message.allowedUris.length; ++j) + object.allowedUris[j] = message.allowedUris[j]; + } + if (message.allowedEmailAddresses && message.allowedEmailAddresses.length) { + object.allowedEmailAddresses = []; + for (var j = 0; j < message.allowedEmailAddresses.length; ++j) + object.allowedEmailAddresses[j] = message.allowedEmailAddresses[j]; + } + if (message.allowedIps && message.allowedIps.length) { + object.allowedIps = []; + for (var j = 0; j < message.allowedIps.length; ++j) + object.allowedIps[j] = message.allowedIps[j]; + } + if (message.allowGlobbingDnsWildcards != null && message.hasOwnProperty("allowGlobbingDnsWildcards")) + object.allowGlobbingDnsWildcards = message.allowGlobbingDnsWildcards; + if (message.allowCustomSans != null && message.hasOwnProperty("allowCustomSans")) + object.allowCustomSans = message.allowCustomSans; + return object; + }; + + /** + * Converts this AllowedSubjectAltNames to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @instance + * @returns {Object.} JSON object + */ + AllowedSubjectAltNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AllowedSubjectAltNames; + })(); + + CertificateAuthorityPolicy.IssuanceModes = (function() { + + /** + * Properties of an IssuanceModes. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @interface IIssuanceModes + * @property {boolean|null} [allowCsrBasedIssuance] IssuanceModes allowCsrBasedIssuance + * @property {boolean|null} [allowConfigBasedIssuance] IssuanceModes allowConfigBasedIssuance + */ + + /** + * Constructs a new IssuanceModes. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @classdesc Represents an IssuanceModes. + * @implements IIssuanceModes + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes=} [properties] Properties to set + */ + function IssuanceModes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssuanceModes allowCsrBasedIssuance. + * @member {boolean} allowCsrBasedIssuance + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @instance + */ + IssuanceModes.prototype.allowCsrBasedIssuance = false; + + /** + * IssuanceModes allowConfigBasedIssuance. + * @member {boolean} allowConfigBasedIssuance + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @instance + */ + IssuanceModes.prototype.allowConfigBasedIssuance = false; + + /** + * Creates a new IssuanceModes instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} IssuanceModes instance + */ + IssuanceModes.create = function create(properties) { + return new IssuanceModes(properties); + }; + + /** + * Encodes the specified IssuanceModes message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes} message IssuanceModes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuanceModes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowCsrBasedIssuance != null && Object.hasOwnProperty.call(message, "allowCsrBasedIssuance")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowCsrBasedIssuance); + if (message.allowConfigBasedIssuance != null && Object.hasOwnProperty.call(message, "allowConfigBasedIssuance")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowConfigBasedIssuance); + return writer; + }; + + /** + * Encodes the specified IssuanceModes message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes} message IssuanceModes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuanceModes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuanceModes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.allowCsrBasedIssuance = reader.bool(); + break; + case 2: + message.allowConfigBasedIssuance = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuanceModes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssuanceModes message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssuanceModes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowCsrBasedIssuance != null && message.hasOwnProperty("allowCsrBasedIssuance")) + if (typeof message.allowCsrBasedIssuance !== "boolean") + return "allowCsrBasedIssuance: boolean expected"; + if (message.allowConfigBasedIssuance != null && message.hasOwnProperty("allowConfigBasedIssuance")) + if (typeof message.allowConfigBasedIssuance !== "boolean") + return "allowConfigBasedIssuance: boolean expected"; + return null; + }; + + /** + * Creates an IssuanceModes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} IssuanceModes + */ + IssuanceModes.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes(); + if (object.allowCsrBasedIssuance != null) + message.allowCsrBasedIssuance = Boolean(object.allowCsrBasedIssuance); + if (object.allowConfigBasedIssuance != null) + message.allowConfigBasedIssuance = Boolean(object.allowConfigBasedIssuance); + return message; + }; + + /** + * Creates a plain object from an IssuanceModes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes} message IssuanceModes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssuanceModes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.allowCsrBasedIssuance = false; + object.allowConfigBasedIssuance = false; + } + if (message.allowCsrBasedIssuance != null && message.hasOwnProperty("allowCsrBasedIssuance")) + object.allowCsrBasedIssuance = message.allowCsrBasedIssuance; + if (message.allowConfigBasedIssuance != null && message.hasOwnProperty("allowConfigBasedIssuance")) + object.allowConfigBasedIssuance = message.allowConfigBasedIssuance; + return object; + }; + + /** + * Converts this IssuanceModes to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @instance + * @returns {Object.} JSON object + */ + IssuanceModes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IssuanceModes; + })(); + + return CertificateAuthorityPolicy; + })(); + + CertificateAuthority.AccessUrls = (function() { + + /** + * Properties of an AccessUrls. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @interface IAccessUrls + * @property {string|null} [caCertificateAccessUrl] AccessUrls caCertificateAccessUrl + * @property {string|null} [crlAccessUrl] AccessUrls crlAccessUrl + */ + + /** + * Constructs a new AccessUrls. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @classdesc Represents an AccessUrls. + * @implements IAccessUrls + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls=} [properties] Properties to set + */ + function AccessUrls(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessUrls caCertificateAccessUrl. + * @member {string} caCertificateAccessUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @instance + */ + AccessUrls.prototype.caCertificateAccessUrl = ""; + + /** + * AccessUrls crlAccessUrl. + * @member {string} crlAccessUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @instance + */ + AccessUrls.prototype.crlAccessUrl = ""; + + /** + * Creates a new AccessUrls instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} AccessUrls instance + */ + AccessUrls.create = function create(properties) { + return new AccessUrls(properties); + }; + + /** + * Encodes the specified AccessUrls message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls} message AccessUrls message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessUrls.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caCertificateAccessUrl != null && Object.hasOwnProperty.call(message, "caCertificateAccessUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertificateAccessUrl); + if (message.crlAccessUrl != null && Object.hasOwnProperty.call(message, "crlAccessUrl")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.crlAccessUrl); + return writer; + }; + + /** + * Encodes the specified AccessUrls message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls} message AccessUrls message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessUrls.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessUrls message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} AccessUrls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessUrls.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.caCertificateAccessUrl = reader.string(); + break; + case 2: + message.crlAccessUrl = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessUrls message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} AccessUrls + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessUrls.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessUrls message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessUrls.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caCertificateAccessUrl != null && message.hasOwnProperty("caCertificateAccessUrl")) + if (!$util.isString(message.caCertificateAccessUrl)) + return "caCertificateAccessUrl: string expected"; + if (message.crlAccessUrl != null && message.hasOwnProperty("crlAccessUrl")) + if (!$util.isString(message.crlAccessUrl)) + return "crlAccessUrl: string expected"; + return null; + }; + + /** + * Creates an AccessUrls message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} AccessUrls + */ + AccessUrls.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls(); + if (object.caCertificateAccessUrl != null) + message.caCertificateAccessUrl = String(object.caCertificateAccessUrl); + if (object.crlAccessUrl != null) + message.crlAccessUrl = String(object.crlAccessUrl); + return message; + }; + + /** + * Creates a plain object from an AccessUrls message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls} message AccessUrls + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessUrls.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.caCertificateAccessUrl = ""; + object.crlAccessUrl = ""; + } + if (message.caCertificateAccessUrl != null && message.hasOwnProperty("caCertificateAccessUrl")) + object.caCertificateAccessUrl = message.caCertificateAccessUrl; + if (message.crlAccessUrl != null && message.hasOwnProperty("crlAccessUrl")) + object.crlAccessUrl = message.crlAccessUrl; + return object; + }; + + /** + * Converts this AccessUrls to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @instance + * @returns {Object.} JSON object + */ + AccessUrls.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AccessUrls; + })(); + + CertificateAuthority.KeyVersionSpec = (function() { + + /** + * Properties of a KeyVersionSpec. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @interface IKeyVersionSpec + * @property {string|null} [cloudKmsKeyVersion] KeyVersionSpec cloudKmsKeyVersion + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|null} [algorithm] KeyVersionSpec algorithm + */ + + /** + * Constructs a new KeyVersionSpec. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @classdesc Represents a KeyVersionSpec. + * @implements IKeyVersionSpec + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec=} [properties] Properties to set + */ + function KeyVersionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyVersionSpec cloudKmsKeyVersion. + * @member {string} cloudKmsKeyVersion + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @instance + */ + KeyVersionSpec.prototype.cloudKmsKeyVersion = ""; + + /** + * KeyVersionSpec algorithm. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm} algorithm + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @instance + */ + KeyVersionSpec.prototype.algorithm = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * KeyVersionSpec KeyVersion. + * @member {"cloudKmsKeyVersion"|"algorithm"|undefined} KeyVersion + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @instance + */ + Object.defineProperty(KeyVersionSpec.prototype, "KeyVersion", { + get: $util.oneOfGetter($oneOfFields = ["cloudKmsKeyVersion", "algorithm"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new KeyVersionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec instance + */ + KeyVersionSpec.create = function create(properties) { + return new KeyVersionSpec(properties); + }; + + /** + * Encodes the specified KeyVersionSpec message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec} message KeyVersionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyVersionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudKmsKeyVersion != null && Object.hasOwnProperty.call(message, "cloudKmsKeyVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudKmsKeyVersion); + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.algorithm); + return writer; + }; + + /** + * Encodes the specified KeyVersionSpec message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec} message KeyVersionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyVersionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyVersionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyVersionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cloudKmsKeyVersion = reader.string(); + break; + case 2: + message.algorithm = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyVersionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyVersionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyVersionSpec message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyVersionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cloudKmsKeyVersion != null && message.hasOwnProperty("cloudKmsKeyVersion")) { + properties.KeyVersion = 1; + if (!$util.isString(message.cloudKmsKeyVersion)) + return "cloudKmsKeyVersion: string expected"; + } + if (message.algorithm != null && message.hasOwnProperty("algorithm")) { + if (properties.KeyVersion === 1) + return "KeyVersion: multiple values"; + properties.KeyVersion = 1; + switch (message.algorithm) { + default: + return "algorithm: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a KeyVersionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec + */ + KeyVersionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec(); + if (object.cloudKmsKeyVersion != null) + message.cloudKmsKeyVersion = String(object.cloudKmsKeyVersion); + switch (object.algorithm) { + case "SIGN_HASH_ALGORITHM_UNSPECIFIED": + case 0: + message.algorithm = 0; + break; + case "RSA_PSS_2048_SHA_256": + case 1: + message.algorithm = 1; + break; + case "RSA_PSS_3072_SHA_256": + case 2: + message.algorithm = 2; + break; + case "RSA_PSS_4096_SHA_256": + case 3: + message.algorithm = 3; + break; + case "EC_P256_SHA256": + case 4: + message.algorithm = 4; + break; + case "EC_P384_SHA384": + case 5: + message.algorithm = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a KeyVersionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec} message KeyVersionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyVersionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudKmsKeyVersion != null && message.hasOwnProperty("cloudKmsKeyVersion")) { + object.cloudKmsKeyVersion = message.cloudKmsKeyVersion; + if (options.oneofs) + object.KeyVersion = "cloudKmsKeyVersion"; + } + if (message.algorithm != null && message.hasOwnProperty("algorithm")) { + object.algorithm = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm[message.algorithm] : message.algorithm; + if (options.oneofs) + object.KeyVersion = "algorithm"; + } + return object; + }; + + /** + * Converts this KeyVersionSpec to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @instance + * @returns {Object.} JSON object + */ + KeyVersionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyVersionSpec; + })(); + + /** + * Type enum. + * @name google.cloud.security.privateca.v1beta1.CertificateAuthority.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SELF_SIGNED=1 SELF_SIGNED value + * @property {number} SUBORDINATE=2 SUBORDINATE value + */ + CertificateAuthority.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SELF_SIGNED"] = 1; + values[valuesById[2] = "SUBORDINATE"] = 2; + return values; + })(); + + /** + * Tier enum. + * @name google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} ENTERPRISE=1 ENTERPRISE value + * @property {number} DEVOPS=2 DEVOPS value + */ + CertificateAuthority.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTERPRISE"] = 1; + values[valuesById[2] = "DEVOPS"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.security.privateca.v1beta1.CertificateAuthority.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} PENDING_ACTIVATION=3 PENDING_ACTIVATION value + * @property {number} PENDING_DELETION=4 PENDING_DELETION value + */ + CertificateAuthority.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "PENDING_ACTIVATION"] = 3; + values[valuesById[4] = "PENDING_DELETION"] = 4; + return values; + })(); + + /** + * SignHashAlgorithm enum. + * @name google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm + * @enum {number} + * @property {number} SIGN_HASH_ALGORITHM_UNSPECIFIED=0 SIGN_HASH_ALGORITHM_UNSPECIFIED value + * @property {number} RSA_PSS_2048_SHA_256=1 RSA_PSS_2048_SHA_256 value + * @property {number} RSA_PSS_3072_SHA_256=2 RSA_PSS_3072_SHA_256 value + * @property {number} RSA_PSS_4096_SHA_256=3 RSA_PSS_4096_SHA_256 value + * @property {number} EC_P256_SHA256=4 EC_P256_SHA256 value + * @property {number} EC_P384_SHA384=5 EC_P384_SHA384 value + */ + CertificateAuthority.SignHashAlgorithm = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGN_HASH_ALGORITHM_UNSPECIFIED"] = 0; + values[valuesById[1] = "RSA_PSS_2048_SHA_256"] = 1; + values[valuesById[2] = "RSA_PSS_3072_SHA_256"] = 2; + values[valuesById[3] = "RSA_PSS_4096_SHA_256"] = 3; + values[valuesById[4] = "EC_P256_SHA256"] = 4; + values[valuesById[5] = "EC_P384_SHA384"] = 5; + return values; + })(); + + return CertificateAuthority; + })(); + + v1beta1.CertificateRevocationList = (function() { + + /** + * Properties of a CertificateRevocationList. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICertificateRevocationList + * @property {string|null} [name] CertificateRevocationList name + * @property {number|Long|null} [sequenceNumber] CertificateRevocationList sequenceNumber + * @property {Array.|null} [revokedCertificates] CertificateRevocationList revokedCertificates + * @property {string|null} [pemCrl] CertificateRevocationList pemCrl + * @property {string|null} [accessUrl] CertificateRevocationList accessUrl + * @property {google.cloud.security.privateca.v1beta1.CertificateRevocationList.State|null} [state] CertificateRevocationList state + * @property {google.protobuf.ITimestamp|null} [createTime] CertificateRevocationList createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CertificateRevocationList updateTime + * @property {Object.|null} [labels] CertificateRevocationList labels + */ + + /** + * Constructs a new CertificateRevocationList. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CertificateRevocationList. + * @implements ICertificateRevocationList + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICertificateRevocationList=} [properties] Properties to set + */ + function CertificateRevocationList(properties) { + this.revokedCertificates = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateRevocationList name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.name = ""; + + /** + * CertificateRevocationList sequenceNumber. + * @member {number|Long} sequenceNumber + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CertificateRevocationList revokedCertificates. + * @member {Array.} revokedCertificates + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.revokedCertificates = $util.emptyArray; + + /** + * CertificateRevocationList pemCrl. + * @member {string} pemCrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.pemCrl = ""; + + /** + * CertificateRevocationList accessUrl. + * @member {string} accessUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.accessUrl = ""; + + /** + * CertificateRevocationList state. + * @member {google.cloud.security.privateca.v1beta1.CertificateRevocationList.State} state + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.state = 0; + + /** + * CertificateRevocationList createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.createTime = null; + + /** + * CertificateRevocationList updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.updateTime = null; + + /** + * CertificateRevocationList labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.labels = $util.emptyObject; + + /** + * Creates a new CertificateRevocationList instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateRevocationList=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList} CertificateRevocationList instance + */ + CertificateRevocationList.create = function create(properties) { + return new CertificateRevocationList(properties); + }; + + /** + * Encodes the specified CertificateRevocationList message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateRevocationList} message CertificateRevocationList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateRevocationList.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.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sequenceNumber); + if (message.revokedCertificates != null && message.revokedCertificates.length) + for (var i = 0; i < message.revokedCertificates.length; ++i) + $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.encode(message.revokedCertificates[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pemCrl != null && Object.hasOwnProperty.call(message, "pemCrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pemCrl); + if (message.accessUrl != null && Object.hasOwnProperty.call(message, "accessUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.accessUrl); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).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 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateRevocationList message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateRevocationList} message CertificateRevocationList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateRevocationList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList} CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateRevocationList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.sequenceNumber = reader.int64(); + break; + case 3: + if (!(message.revokedCertificates && message.revokedCertificates.length)) + message.revokedCertificates = []; + message.revokedCertificates.push($root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.decode(reader, reader.uint32())); + break; + case 4: + message.pemCrl = reader.string(); + break; + case 5: + message.accessUrl = reader.string(); + break; + case 6: + message.state = reader.int32(); + break; + case 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + 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; + } + } + return message; + }; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList} CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateRevocationList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateRevocationList message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateRevocationList.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.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high))) + return "sequenceNumber: integer|Long expected"; + if (message.revokedCertificates != null && message.hasOwnProperty("revokedCertificates")) { + if (!Array.isArray(message.revokedCertificates)) + return "revokedCertificates: array expected"; + for (var i = 0; i < message.revokedCertificates.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.verify(message.revokedCertificates[i]); + if (error) + return "revokedCertificates." + error; + } + } + if (message.pemCrl != null && message.hasOwnProperty("pemCrl")) + if (!$util.isString(message.pemCrl)) + return "pemCrl: string expected"; + if (message.accessUrl != null && message.hasOwnProperty("accessUrl")) + if (!$util.isString(message.accessUrl)) + return "accessUrl: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + 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; + }; + + /** + * Creates a CertificateRevocationList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList} CertificateRevocationList + */ + CertificateRevocationList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList(); + if (object.name != null) + message.name = String(object.name); + if (object.sequenceNumber != null) + if ($util.Long) + (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false; + else if (typeof object.sequenceNumber === "string") + message.sequenceNumber = parseInt(object.sequenceNumber, 10); + else if (typeof object.sequenceNumber === "number") + message.sequenceNumber = object.sequenceNumber; + else if (typeof object.sequenceNumber === "object") + message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber(); + if (object.revokedCertificates) { + if (!Array.isArray(object.revokedCertificates)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateRevocationList.revokedCertificates: array expected"); + message.revokedCertificates = []; + for (var i = 0; i < object.revokedCertificates.length; ++i) { + if (typeof object.revokedCertificates[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateRevocationList.revokedCertificates: object expected"); + message.revokedCertificates[i] = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.fromObject(object.revokedCertificates[i]); + } + } + if (object.pemCrl != null) + message.pemCrl = String(object.pemCrl); + if (object.accessUrl != null) + message.accessUrl = String(object.accessUrl); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "SUPERSEDED": + case 2: + message.state = 2; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateRevocationList.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateRevocationList.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateRevocationList.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; + }; + + /** + * Creates a plain object from a CertificateRevocationList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList} message CertificateRevocationList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateRevocationList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.revokedCertificates = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequenceNumber = options.longs === String ? "0" : 0; + object.pemCrl = ""; + object.accessUrl = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (typeof message.sequenceNumber === "number") + object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber; + else + object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber; + if (message.revokedCertificates && message.revokedCertificates.length) { + object.revokedCertificates = []; + for (var j = 0; j < message.revokedCertificates.length; ++j) + object.revokedCertificates[j] = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.toObject(message.revokedCertificates[j], options); + } + if (message.pemCrl != null && message.hasOwnProperty("pemCrl")) + object.pemCrl = message.pemCrl; + if (message.accessUrl != null && message.hasOwnProperty("accessUrl")) + object.accessUrl = message.accessUrl; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, 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; + }; + + /** + * Converts this CertificateRevocationList to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @instance + * @returns {Object.} JSON object + */ + CertificateRevocationList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateRevocationList.RevokedCertificate = (function() { + + /** + * Properties of a RevokedCertificate. + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @interface IRevokedCertificate + * @property {string|null} [certificate] RevokedCertificate certificate + * @property {string|null} [hexSerialNumber] RevokedCertificate hexSerialNumber + * @property {google.cloud.security.privateca.v1beta1.RevocationReason|null} [revocationReason] RevokedCertificate revocationReason + */ + + /** + * Constructs a new RevokedCertificate. + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @classdesc Represents a RevokedCertificate. + * @implements IRevokedCertificate + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate=} [properties] Properties to set + */ + function RevokedCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevokedCertificate certificate. + * @member {string} certificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @instance + */ + RevokedCertificate.prototype.certificate = ""; + + /** + * RevokedCertificate hexSerialNumber. + * @member {string} hexSerialNumber + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @instance + */ + RevokedCertificate.prototype.hexSerialNumber = ""; + + /** + * RevokedCertificate revocationReason. + * @member {google.cloud.security.privateca.v1beta1.RevocationReason} revocationReason + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @instance + */ + RevokedCertificate.prototype.revocationReason = 0; + + /** + * Creates a new RevokedCertificate instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} RevokedCertificate instance + */ + RevokedCertificate.create = function create(properties) { + return new RevokedCertificate(properties); + }; + + /** + * Encodes the specified RevokedCertificate message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate} message RevokedCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokedCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.certificate); + if (message.hexSerialNumber != null && Object.hasOwnProperty.call(message, "hexSerialNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hexSerialNumber); + if (message.revocationReason != null && Object.hasOwnProperty.call(message, "revocationReason")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.revocationReason); + return writer; + }; + + /** + * Encodes the specified RevokedCertificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList.IRevokedCertificate} message RevokedCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokedCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokedCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificate = reader.string(); + break; + case 2: + message.hexSerialNumber = reader.string(); + break; + case 3: + message.revocationReason = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokedCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevokedCertificate message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevokedCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificate != null && message.hasOwnProperty("certificate")) + if (!$util.isString(message.certificate)) + return "certificate: string expected"; + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + if (!$util.isString(message.hexSerialNumber)) + return "hexSerialNumber: string expected"; + if (message.revocationReason != null && message.hasOwnProperty("revocationReason")) + switch (message.revocationReason) { + default: + return "revocationReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + return null; + }; + + /** + * Creates a RevokedCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} RevokedCertificate + */ + RevokedCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate(); + if (object.certificate != null) + message.certificate = String(object.certificate); + if (object.hexSerialNumber != null) + message.hexSerialNumber = String(object.hexSerialNumber); + switch (object.revocationReason) { + case "REVOCATION_REASON_UNSPECIFIED": + case 0: + message.revocationReason = 0; + break; + case "KEY_COMPROMISE": + case 1: + message.revocationReason = 1; + break; + case "CERTIFICATE_AUTHORITY_COMPROMISE": + case 2: + message.revocationReason = 2; + break; + case "AFFILIATION_CHANGED": + case 3: + message.revocationReason = 3; + break; + case "SUPERSEDED": + case 4: + message.revocationReason = 4; + break; + case "CESSATION_OF_OPERATION": + case 5: + message.revocationReason = 5; + break; + case "CERTIFICATE_HOLD": + case 6: + message.revocationReason = 6; + break; + case "PRIVILEGE_WITHDRAWN": + case 7: + message.revocationReason = 7; + break; + case "ATTRIBUTE_AUTHORITY_COMPROMISE": + case 8: + message.revocationReason = 8; + break; + } + return message; + }; + + /** + * Creates a plain object from a RevokedCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate} message RevokedCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevokedCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificate = ""; + object.hexSerialNumber = ""; + object.revocationReason = options.enums === String ? "REVOCATION_REASON_UNSPECIFIED" : 0; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = message.certificate; + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + object.hexSerialNumber = message.hexSerialNumber; + if (message.revocationReason != null && message.hasOwnProperty("revocationReason")) + object.revocationReason = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationReason] : message.revocationReason; + return object; + }; + + /** + * Converts this RevokedCertificate to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @instance + * @returns {Object.} JSON object + */ + RevokedCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RevokedCertificate; + })(); + + /** + * State enum. + * @name google.cloud.security.privateca.v1beta1.CertificateRevocationList.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} SUPERSEDED=2 SUPERSEDED value + */ + CertificateRevocationList.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "SUPERSEDED"] = 2; + return values; + })(); + + return CertificateRevocationList; + })(); + + v1beta1.Certificate = (function() { + + /** + * Properties of a Certificate. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICertificate + * @property {string|null} [name] Certificate name + * @property {string|null} [pemCsr] Certificate pemCsr + * @property {google.cloud.security.privateca.v1beta1.ICertificateConfig|null} [config] Certificate config + * @property {google.protobuf.IDuration|null} [lifetime] Certificate lifetime + * @property {google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails|null} [revocationDetails] Certificate revocationDetails + * @property {string|null} [pemCertificate] Certificate pemCertificate + * @property {google.cloud.security.privateca.v1beta1.ICertificateDescription|null} [certificateDescription] Certificate certificateDescription + * @property {Array.|null} [pemCertificateChain] Certificate pemCertificateChain + * @property {google.protobuf.ITimestamp|null} [createTime] Certificate createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Certificate updateTime + * @property {Object.|null} [labels] Certificate labels + */ + + /** + * Constructs a new Certificate. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a Certificate. + * @implements ICertificate + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICertificate=} [properties] Properties to set + */ + function Certificate(properties) { + this.pemCertificateChain = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Certificate name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.name = ""; + + /** + * Certificate pemCsr. + * @member {string} pemCsr + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.pemCsr = ""; + + /** + * Certificate config. + * @member {google.cloud.security.privateca.v1beta1.ICertificateConfig|null|undefined} config + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.config = null; + + /** + * Certificate lifetime. + * @member {google.protobuf.IDuration|null|undefined} lifetime + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.lifetime = null; + + /** + * Certificate revocationDetails. + * @member {google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails|null|undefined} revocationDetails + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.revocationDetails = null; + + /** + * Certificate pemCertificate. + * @member {string} pemCertificate + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.pemCertificate = ""; + + /** + * Certificate certificateDescription. + * @member {google.cloud.security.privateca.v1beta1.ICertificateDescription|null|undefined} certificateDescription + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.certificateDescription = null; + + /** + * Certificate pemCertificateChain. + * @member {Array.} pemCertificateChain + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.pemCertificateChain = $util.emptyArray; + + /** + * Certificate createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.createTime = null; + + /** + * Certificate updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.updateTime = null; + + /** + * Certificate labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Certificate.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Certificate certificateConfig. + * @member {"pemCsr"|"config"|undefined} certificateConfig + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + */ + Object.defineProperty(Certificate.prototype, "certificateConfig", { + get: $util.oneOfGetter($oneOfFields = ["pemCsr", "config"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Certificate instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificate=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.Certificate} Certificate instance + */ + Certificate.create = function create(properties) { + return new Certificate(properties); + }; + + /** + * Encodes the specified Certificate message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificate} message Certificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Certificate.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.pemCsr != null && Object.hasOwnProperty.call(message, "pemCsr")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pemCsr); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.security.privateca.v1beta1.CertificateConfig.encode(message.config, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.revocationDetails != null && Object.hasOwnProperty.call(message, "revocationDetails")) + $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.encode(message.revocationDetails, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.pemCertificate != null && Object.hasOwnProperty.call(message, "pemCertificate")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pemCertificate); + if (message.certificateDescription != null && Object.hasOwnProperty.call(message, "certificateDescription")) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.encode(message.certificateDescription, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pemCertificateChain != null && message.pemCertificateChain.length) + for (var i = 0; i < message.pemCertificateChain.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.pemCertificateChain[i]); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 10, wireType 2 =*/82).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 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Certificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificate} message Certificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Certificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Certificate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.Certificate} Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Certificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.Certificate(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pemCsr = reader.string(); + break; + case 3: + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); + break; + case 4: + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.revocationDetails = $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.decode(reader, reader.uint32()); + break; + case 6: + message.pemCertificate = reader.string(); + break; + case 7: + message.certificateDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32()); + break; + case 8: + if (!(message.pemCertificateChain && message.pemCertificateChain.length)) + message.pemCertificateChain = []; + message.pemCertificateChain.push(reader.string()); + break; + case 9: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 11: + 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; + } + } + return message; + }; + + /** + * Decodes a Certificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.Certificate} Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Certificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Certificate message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Certificate.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.pemCsr != null && message.hasOwnProperty("pemCsr")) { + properties.certificateConfig = 1; + if (!$util.isString(message.pemCsr)) + return "pemCsr: string expected"; + } + if (message.config != null && message.hasOwnProperty("config")) { + if (properties.certificateConfig === 1) + return "certificateConfig: multiple values"; + properties.certificateConfig = 1; + { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.lifetime != null && message.hasOwnProperty("lifetime")) { + var error = $root.google.protobuf.Duration.verify(message.lifetime); + if (error) + return "lifetime." + error; + } + if (message.revocationDetails != null && message.hasOwnProperty("revocationDetails")) { + var error = $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.verify(message.revocationDetails); + if (error) + return "revocationDetails." + error; + } + if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) + if (!$util.isString(message.pemCertificate)) + return "pemCertificate: string expected"; + if (message.certificateDescription != null && message.hasOwnProperty("certificateDescription")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.verify(message.certificateDescription); + if (error) + return "certificateDescription." + error; + } + if (message.pemCertificateChain != null && message.hasOwnProperty("pemCertificateChain")) { + if (!Array.isArray(message.pemCertificateChain)) + return "pemCertificateChain: array expected"; + for (var i = 0; i < message.pemCertificateChain.length; ++i) + if (!$util.isString(message.pemCertificateChain[i])) + return "pemCertificateChain: string[] expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + 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; + }; + + /** + * Creates a Certificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.Certificate} Certificate + */ + Certificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.Certificate) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.Certificate(); + if (object.name != null) + message.name = String(object.name); + if (object.pemCsr != null) + message.pemCsr = String(object.pemCsr); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.config: object expected"); + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.fromObject(object.config); + } + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.revocationDetails != null) { + if (typeof object.revocationDetails !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.revocationDetails: object expected"); + message.revocationDetails = $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.fromObject(object.revocationDetails); + } + if (object.pemCertificate != null) + message.pemCertificate = String(object.pemCertificate); + if (object.certificateDescription != null) { + if (typeof object.certificateDescription !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.certificateDescription: object expected"); + message.certificateDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.fromObject(object.certificateDescription); + } + if (object.pemCertificateChain) { + if (!Array.isArray(object.pemCertificateChain)) + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.pemCertificateChain: array expected"); + message.pemCertificateChain = []; + for (var i = 0; i < object.pemCertificateChain.length; ++i) + message.pemCertificateChain[i] = String(object.pemCertificateChain[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.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; + }; + + /** + * Creates a plain object from a Certificate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {google.cloud.security.privateca.v1beta1.Certificate} message Certificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Certificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pemCertificateChain = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.lifetime = null; + object.revocationDetails = null; + object.pemCertificate = ""; + object.certificateDescription = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pemCsr != null && message.hasOwnProperty("pemCsr")) { + object.pemCsr = message.pemCsr; + if (options.oneofs) + object.certificateConfig = "pemCsr"; + } + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.toObject(message.config, options); + if (options.oneofs) + object.certificateConfig = "config"; + } + if (message.lifetime != null && message.hasOwnProperty("lifetime")) + object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); + if (message.revocationDetails != null && message.hasOwnProperty("revocationDetails")) + object.revocationDetails = $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.toObject(message.revocationDetails, options); + if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) + object.pemCertificate = message.pemCertificate; + if (message.certificateDescription != null && message.hasOwnProperty("certificateDescription")) + object.certificateDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.toObject(message.certificateDescription, options); + if (message.pemCertificateChain && message.pemCertificateChain.length) { + object.pemCertificateChain = []; + for (var j = 0; j < message.pemCertificateChain.length; ++j) + object.pemCertificateChain[j] = message.pemCertificateChain[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, 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; + }; + + /** + * Converts this Certificate to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @instance + * @returns {Object.} JSON object + */ + Certificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Certificate.RevocationDetails = (function() { + + /** + * Properties of a RevocationDetails. + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @interface IRevocationDetails + * @property {google.cloud.security.privateca.v1beta1.RevocationReason|null} [revocationState] RevocationDetails revocationState + * @property {google.protobuf.ITimestamp|null} [revocationTime] RevocationDetails revocationTime + */ + + /** + * Constructs a new RevocationDetails. + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @classdesc Represents a RevocationDetails. + * @implements IRevocationDetails + * @constructor + * @param {google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails=} [properties] Properties to set + */ + function RevocationDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevocationDetails revocationState. + * @member {google.cloud.security.privateca.v1beta1.RevocationReason} revocationState + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @instance + */ + RevocationDetails.prototype.revocationState = 0; + + /** + * RevocationDetails revocationTime. + * @member {google.protobuf.ITimestamp|null|undefined} revocationTime + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @instance + */ + RevocationDetails.prototype.revocationTime = null; + + /** + * Creates a new RevocationDetails instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} RevocationDetails instance + */ + RevocationDetails.create = function create(properties) { + return new RevocationDetails(properties); + }; + + /** + * Encodes the specified RevocationDetails message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails} message RevocationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevocationDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revocationState != null && Object.hasOwnProperty.call(message, "revocationState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.revocationState); + if (message.revocationTime != null && Object.hasOwnProperty.call(message, "revocationTime")) + $root.google.protobuf.Timestamp.encode(message.revocationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RevocationDetails message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1beta1.Certificate.IRevocationDetails} message RevocationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevocationDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevocationDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.revocationState = reader.int32(); + break; + case 2: + message.revocationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevocationDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevocationDetails message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevocationDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revocationState != null && message.hasOwnProperty("revocationState")) + switch (message.revocationState) { + default: + return "revocationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.revocationTime != null && message.hasOwnProperty("revocationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revocationTime); + if (error) + return "revocationTime." + error; + } + return null; + }; + + /** + * Creates a RevocationDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} RevocationDetails + */ + RevocationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails(); + switch (object.revocationState) { + case "REVOCATION_REASON_UNSPECIFIED": + case 0: + message.revocationState = 0; + break; + case "KEY_COMPROMISE": + case 1: + message.revocationState = 1; + break; + case "CERTIFICATE_AUTHORITY_COMPROMISE": + case 2: + message.revocationState = 2; + break; + case "AFFILIATION_CHANGED": + case 3: + message.revocationState = 3; + break; + case "SUPERSEDED": + case 4: + message.revocationState = 4; + break; + case "CESSATION_OF_OPERATION": + case 5: + message.revocationState = 5; + break; + case "CERTIFICATE_HOLD": + case 6: + message.revocationState = 6; + break; + case "PRIVILEGE_WITHDRAWN": + case 7: + message.revocationState = 7; + break; + case "ATTRIBUTE_AUTHORITY_COMPROMISE": + case 8: + message.revocationState = 8; + break; + } + if (object.revocationTime != null) { + if (typeof object.revocationTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.revocationTime: object expected"); + message.revocationTime = $root.google.protobuf.Timestamp.fromObject(object.revocationTime); + } + return message; + }; + + /** + * Creates a plain object from a RevocationDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails} message RevocationDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevocationDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.revocationState = options.enums === String ? "REVOCATION_REASON_UNSPECIFIED" : 0; + object.revocationTime = null; + } + if (message.revocationState != null && message.hasOwnProperty("revocationState")) + object.revocationState = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationState] : message.revocationState; + if (message.revocationTime != null && message.hasOwnProperty("revocationTime")) + object.revocationTime = $root.google.protobuf.Timestamp.toObject(message.revocationTime, options); + return object; + }; + + /** + * Converts this RevocationDetails to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @instance + * @returns {Object.} JSON object + */ + RevocationDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RevocationDetails; + })(); + + return Certificate; + })(); + + v1beta1.ReusableConfig = (function() { + + /** + * Properties of a ReusableConfig. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IReusableConfig + * @property {string|null} [name] ReusableConfig name + * @property {google.cloud.security.privateca.v1beta1.IReusableConfigValues|null} [values] ReusableConfig values + * @property {string|null} [description] ReusableConfig description + * @property {google.protobuf.ITimestamp|null} [createTime] ReusableConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] ReusableConfig updateTime + * @property {Object.|null} [labels] ReusableConfig labels + */ + + /** + * Constructs a new ReusableConfig. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ReusableConfig. + * @implements IReusableConfig + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IReusableConfig=} [properties] Properties to set + */ + function ReusableConfig(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReusableConfig name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + */ + ReusableConfig.prototype.name = ""; + + /** + * ReusableConfig values. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfigValues|null|undefined} values + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + */ + ReusableConfig.prototype.values = null; + + /** + * ReusableConfig description. + * @member {string} description + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + */ + ReusableConfig.prototype.description = ""; + + /** + * ReusableConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + */ + ReusableConfig.prototype.createTime = null; + + /** + * ReusableConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + */ + ReusableConfig.prototype.updateTime = null; + + /** + * ReusableConfig labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + */ + ReusableConfig.prototype.labels = $util.emptyObject; + + /** + * Creates a new ReusableConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfig} ReusableConfig instance + */ + ReusableConfig.create = function create(properties) { + return new ReusableConfig(properties); + }; + + /** + * Encodes the specified ReusableConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfig} message ReusableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReusableConfig.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.values != null && Object.hasOwnProperty.call(message, "values")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.encode(message.values, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReusableConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfig} message ReusableConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReusableConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReusableConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfig} ReusableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReusableConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.values = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReusableConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfig} ReusableConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReusableConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReusableConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReusableConfig.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.values != null && message.hasOwnProperty("values")) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify(message.values); + if (error) + return "values." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + 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; + }; + + /** + * Creates a ReusableConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfig} ReusableConfig + */ + ReusableConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ReusableConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.values != null) { + if (typeof object.values !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfig.values: object expected"); + message.values = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.fromObject(object.values); + } + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfig.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; + }; + + /** + * Creates a plain object from a ReusableConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfig} message ReusableConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReusableConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.values = null; + object.description = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.values != null && message.hasOwnProperty("values")) + object.values = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.toObject(message.values, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, 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; + }; + + /** + * Converts this ReusableConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @instance + * @returns {Object.} JSON object + */ + ReusableConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReusableConfig; + })(); + + v1beta1.ReusableConfigValues = (function() { + + /** + * Properties of a ReusableConfigValues. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IReusableConfigValues + * @property {google.cloud.security.privateca.v1beta1.IKeyUsage|null} [keyUsage] ReusableConfigValues keyUsage + * @property {google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions|null} [caOptions] ReusableConfigValues caOptions + * @property {Array.|null} [policyIds] ReusableConfigValues policyIds + * @property {Array.|null} [aiaOcspServers] ReusableConfigValues aiaOcspServers + * @property {Array.|null} [additionalExtensions] ReusableConfigValues additionalExtensions + */ + + /** + * Constructs a new ReusableConfigValues. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ReusableConfigValues. + * @implements IReusableConfigValues + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigValues=} [properties] Properties to set + */ + function ReusableConfigValues(properties) { + this.policyIds = []; + this.aiaOcspServers = []; + this.additionalExtensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReusableConfigValues keyUsage. + * @member {google.cloud.security.privateca.v1beta1.IKeyUsage|null|undefined} keyUsage + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @instance + */ + ReusableConfigValues.prototype.keyUsage = null; + + /** + * ReusableConfigValues caOptions. + * @member {google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions|null|undefined} caOptions + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @instance + */ + ReusableConfigValues.prototype.caOptions = null; + + /** + * ReusableConfigValues policyIds. + * @member {Array.} policyIds + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @instance + */ + ReusableConfigValues.prototype.policyIds = $util.emptyArray; + + /** + * ReusableConfigValues aiaOcspServers. + * @member {Array.} aiaOcspServers + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @instance + */ + ReusableConfigValues.prototype.aiaOcspServers = $util.emptyArray; + + /** + * ReusableConfigValues additionalExtensions. + * @member {Array.} additionalExtensions + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @instance + */ + ReusableConfigValues.prototype.additionalExtensions = $util.emptyArray; + + /** + * Creates a new ReusableConfigValues instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigValues=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues} ReusableConfigValues instance + */ + ReusableConfigValues.create = function create(properties) { + return new ReusableConfigValues(properties); + }; + + /** + * Encodes the specified ReusableConfigValues message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigValues} message ReusableConfigValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReusableConfigValues.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyUsage != null && Object.hasOwnProperty.call(message, "keyUsage")) + $root.google.cloud.security.privateca.v1beta1.KeyUsage.encode(message.keyUsage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.caOptions != null && Object.hasOwnProperty.call(message, "caOptions")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.encode(message.caOptions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.policyIds != null && message.policyIds.length) + for (var i = 0; i < message.policyIds.length; ++i) + $root.google.cloud.security.privateca.v1beta1.ObjectId.encode(message.policyIds[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.aiaOcspServers != null && message.aiaOcspServers.length) + for (var i = 0; i < message.aiaOcspServers.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.aiaOcspServers[i]); + if (message.additionalExtensions != null && message.additionalExtensions.length) + for (var i = 0; i < message.additionalExtensions.length; ++i) + $root.google.cloud.security.privateca.v1beta1.X509Extension.encode(message.additionalExtensions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReusableConfigValues message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigValues} message ReusableConfigValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReusableConfigValues.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReusableConfigValues message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues} ReusableConfigValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReusableConfigValues.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.decode(reader, reader.uint32()); + break; + case 2: + message.caOptions = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.policyIds && message.policyIds.length)) + message.policyIds = []; + message.policyIds.push($root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.aiaOcspServers && message.aiaOcspServers.length)) + message.aiaOcspServers = []; + message.aiaOcspServers.push(reader.string()); + break; + case 5: + if (!(message.additionalExtensions && message.additionalExtensions.length)) + message.additionalExtensions = []; + message.additionalExtensions.push($root.google.cloud.security.privateca.v1beta1.X509Extension.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReusableConfigValues message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues} ReusableConfigValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReusableConfigValues.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReusableConfigValues message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReusableConfigValues.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyUsage != null && message.hasOwnProperty("keyUsage")) { + var error = $root.google.cloud.security.privateca.v1beta1.KeyUsage.verify(message.keyUsage); + if (error) + return "keyUsage." + error; + } + if (message.caOptions != null && message.hasOwnProperty("caOptions")) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.verify(message.caOptions); + if (error) + return "caOptions." + error; + } + if (message.policyIds != null && message.hasOwnProperty("policyIds")) { + if (!Array.isArray(message.policyIds)) + return "policyIds: array expected"; + for (var i = 0; i < message.policyIds.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.ObjectId.verify(message.policyIds[i]); + if (error) + return "policyIds." + error; + } + } + if (message.aiaOcspServers != null && message.hasOwnProperty("aiaOcspServers")) { + if (!Array.isArray(message.aiaOcspServers)) + return "aiaOcspServers: array expected"; + for (var i = 0; i < message.aiaOcspServers.length; ++i) + if (!$util.isString(message.aiaOcspServers[i])) + return "aiaOcspServers: string[] expected"; + } + if (message.additionalExtensions != null && message.hasOwnProperty("additionalExtensions")) { + if (!Array.isArray(message.additionalExtensions)) + return "additionalExtensions: array expected"; + for (var i = 0; i < message.additionalExtensions.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.X509Extension.verify(message.additionalExtensions[i]); + if (error) + return "additionalExtensions." + error; + } + } + return null; + }; + + /** + * Creates a ReusableConfigValues message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues} ReusableConfigValues + */ + ReusableConfigValues.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues(); + if (object.keyUsage != null) { + if (typeof object.keyUsage !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.keyUsage: object expected"); + message.keyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.fromObject(object.keyUsage); + } + if (object.caOptions != null) { + if (typeof object.caOptions !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.caOptions: object expected"); + message.caOptions = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.fromObject(object.caOptions); + } + if (object.policyIds) { + if (!Array.isArray(object.policyIds)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.policyIds: array expected"); + message.policyIds = []; + for (var i = 0; i < object.policyIds.length; ++i) { + if (typeof object.policyIds[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.policyIds: object expected"); + message.policyIds[i] = $root.google.cloud.security.privateca.v1beta1.ObjectId.fromObject(object.policyIds[i]); + } + } + if (object.aiaOcspServers) { + if (!Array.isArray(object.aiaOcspServers)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.aiaOcspServers: array expected"); + message.aiaOcspServers = []; + for (var i = 0; i < object.aiaOcspServers.length; ++i) + message.aiaOcspServers[i] = String(object.aiaOcspServers[i]); + } + if (object.additionalExtensions) { + if (!Array.isArray(object.additionalExtensions)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.additionalExtensions: array expected"); + message.additionalExtensions = []; + for (var i = 0; i < object.additionalExtensions.length; ++i) { + if (typeof object.additionalExtensions[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.additionalExtensions: object expected"); + message.additionalExtensions[i] = $root.google.cloud.security.privateca.v1beta1.X509Extension.fromObject(object.additionalExtensions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ReusableConfigValues message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigValues} message ReusableConfigValues + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReusableConfigValues.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.policyIds = []; + object.aiaOcspServers = []; + object.additionalExtensions = []; + } + if (options.defaults) { + object.keyUsage = null; + object.caOptions = null; + } + if (message.keyUsage != null && message.hasOwnProperty("keyUsage")) + object.keyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.toObject(message.keyUsage, options); + if (message.caOptions != null && message.hasOwnProperty("caOptions")) + object.caOptions = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.toObject(message.caOptions, options); + if (message.policyIds && message.policyIds.length) { + object.policyIds = []; + for (var j = 0; j < message.policyIds.length; ++j) + object.policyIds[j] = $root.google.cloud.security.privateca.v1beta1.ObjectId.toObject(message.policyIds[j], options); + } + if (message.aiaOcspServers && message.aiaOcspServers.length) { + object.aiaOcspServers = []; + for (var j = 0; j < message.aiaOcspServers.length; ++j) + object.aiaOcspServers[j] = message.aiaOcspServers[j]; + } + if (message.additionalExtensions && message.additionalExtensions.length) { + object.additionalExtensions = []; + for (var j = 0; j < message.additionalExtensions.length; ++j) + object.additionalExtensions[j] = $root.google.cloud.security.privateca.v1beta1.X509Extension.toObject(message.additionalExtensions[j], options); + } + return object; + }; + + /** + * Converts this ReusableConfigValues to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @instance + * @returns {Object.} JSON object + */ + ReusableConfigValues.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ReusableConfigValues.CaOptions = (function() { + + /** + * Properties of a CaOptions. + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @interface ICaOptions + * @property {google.protobuf.IBoolValue|null} [isCa] CaOptions isCa + * @property {google.protobuf.IInt32Value|null} [maxIssuerPathLength] CaOptions maxIssuerPathLength + */ + + /** + * Constructs a new CaOptions. + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @classdesc Represents a CaOptions. + * @implements ICaOptions + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions=} [properties] Properties to set + */ + function CaOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CaOptions isCa. + * @member {google.protobuf.IBoolValue|null|undefined} isCa + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @instance + */ + CaOptions.prototype.isCa = null; + + /** + * CaOptions maxIssuerPathLength. + * @member {google.protobuf.IInt32Value|null|undefined} maxIssuerPathLength + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @instance + */ + CaOptions.prototype.maxIssuerPathLength = null; + + /** + * Creates a new CaOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} CaOptions instance + */ + CaOptions.create = function create(properties) { + return new CaOptions(properties); + }; + + /** + * Encodes the specified CaOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions} message CaOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isCa != null && Object.hasOwnProperty.call(message, "isCa")) + $root.google.protobuf.BoolValue.encode(message.isCa, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxIssuerPathLength != null && Object.hasOwnProperty.call(message, "maxIssuerPathLength")) + $root.google.protobuf.Int32Value.encode(message.maxIssuerPathLength, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CaOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigValues.ICaOptions} message CaOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.isCa = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + case 2: + message.maxIssuerPathLength = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isCa != null && message.hasOwnProperty("isCa")) { + var error = $root.google.protobuf.BoolValue.verify(message.isCa); + if (error) + return "isCa." + error; + } + if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) { + var error = $root.google.protobuf.Int32Value.verify(message.maxIssuerPathLength); + if (error) + return "maxIssuerPathLength." + error; + } + return null; + }; + + /** + * Creates a CaOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} CaOptions + */ + CaOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions(); + if (object.isCa != null) { + if (typeof object.isCa !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.isCa: object expected"); + message.isCa = $root.google.protobuf.BoolValue.fromObject(object.isCa); + } + if (object.maxIssuerPathLength != null) { + if (typeof object.maxIssuerPathLength !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.maxIssuerPathLength: object expected"); + message.maxIssuerPathLength = $root.google.protobuf.Int32Value.fromObject(object.maxIssuerPathLength); + } + return message; + }; + + /** + * Creates a plain object from a CaOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions} message CaOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.isCa = null; + object.maxIssuerPathLength = null; + } + if (message.isCa != null && message.hasOwnProperty("isCa")) + object.isCa = $root.google.protobuf.BoolValue.toObject(message.isCa, options); + if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) + object.maxIssuerPathLength = $root.google.protobuf.Int32Value.toObject(message.maxIssuerPathLength, options); + return object; + }; + + /** + * Converts this CaOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @instance + * @returns {Object.} JSON object + */ + CaOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CaOptions; + })(); + + return ReusableConfigValues; + })(); + + v1beta1.ReusableConfigWrapper = (function() { + + /** + * Properties of a ReusableConfigWrapper. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IReusableConfigWrapper + * @property {string|null} [reusableConfig] ReusableConfigWrapper reusableConfig + * @property {google.cloud.security.privateca.v1beta1.IReusableConfigValues|null} [reusableConfigValues] ReusableConfigWrapper reusableConfigValues + */ + + /** + * Constructs a new ReusableConfigWrapper. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ReusableConfigWrapper. + * @implements IReusableConfigWrapper + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper=} [properties] Properties to set + */ + function ReusableConfigWrapper(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReusableConfigWrapper reusableConfig. + * @member {string} reusableConfig + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @instance + */ + ReusableConfigWrapper.prototype.reusableConfig = ""; + + /** + * ReusableConfigWrapper reusableConfigValues. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfigValues|null|undefined} reusableConfigValues + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @instance + */ + ReusableConfigWrapper.prototype.reusableConfigValues = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReusableConfigWrapper configValues. + * @member {"reusableConfig"|"reusableConfigValues"|undefined} configValues + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @instance + */ + Object.defineProperty(ReusableConfigWrapper.prototype, "configValues", { + get: $util.oneOfGetter($oneOfFields = ["reusableConfig", "reusableConfigValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReusableConfigWrapper instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} ReusableConfigWrapper instance + */ + ReusableConfigWrapper.create = function create(properties) { + return new ReusableConfigWrapper(properties); + }; + + /** + * Encodes the specified ReusableConfigWrapper message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper} message ReusableConfigWrapper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReusableConfigWrapper.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reusableConfig != null && Object.hasOwnProperty.call(message, "reusableConfig")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reusableConfig); + if (message.reusableConfigValues != null && Object.hasOwnProperty.call(message, "reusableConfigValues")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.encode(message.reusableConfigValues, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReusableConfigWrapper message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper} message ReusableConfigWrapper message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReusableConfigWrapper.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReusableConfigWrapper message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} ReusableConfigWrapper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReusableConfigWrapper.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.reusableConfig = reader.string(); + break; + case 2: + message.reusableConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReusableConfigWrapper message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} ReusableConfigWrapper + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReusableConfigWrapper.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReusableConfigWrapper message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReusableConfigWrapper.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { + properties.configValues = 1; + if (!$util.isString(message.reusableConfig)) + return "reusableConfig: string expected"; + } + if (message.reusableConfigValues != null && message.hasOwnProperty("reusableConfigValues")) { + if (properties.configValues === 1) + return "configValues: multiple values"; + properties.configValues = 1; + { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify(message.reusableConfigValues); + if (error) + return "reusableConfigValues." + error; + } + } + return null; + }; + + /** + * Creates a ReusableConfigWrapper message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} ReusableConfigWrapper + */ + ReusableConfigWrapper.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper(); + if (object.reusableConfig != null) + message.reusableConfig = String(object.reusableConfig); + if (object.reusableConfigValues != null) { + if (typeof object.reusableConfigValues !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.reusableConfigValues: object expected"); + message.reusableConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.fromObject(object.reusableConfigValues); + } + return message; + }; + + /** + * Creates a plain object from a ReusableConfigWrapper message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {google.cloud.security.privateca.v1beta1.ReusableConfigWrapper} message ReusableConfigWrapper + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReusableConfigWrapper.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { + object.reusableConfig = message.reusableConfig; + if (options.oneofs) + object.configValues = "reusableConfig"; + } + if (message.reusableConfigValues != null && message.hasOwnProperty("reusableConfigValues")) { + object.reusableConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.toObject(message.reusableConfigValues, options); + if (options.oneofs) + object.configValues = "reusableConfigValues"; + } + return object; + }; + + /** + * Converts this ReusableConfigWrapper to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @instance + * @returns {Object.} JSON object + */ + ReusableConfigWrapper.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReusableConfigWrapper; + })(); + + v1beta1.SubordinateConfig = (function() { + + /** + * Properties of a SubordinateConfig. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ISubordinateConfig + * @property {string|null} [certificateAuthority] SubordinateConfig certificateAuthority + * @property {google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain|null} [pemIssuerChain] SubordinateConfig pemIssuerChain + */ + + /** + * Constructs a new SubordinateConfig. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a SubordinateConfig. + * @implements ISubordinateConfig + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ISubordinateConfig=} [properties] Properties to set + */ + function SubordinateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubordinateConfig certificateAuthority. + * @member {string} certificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @instance + */ + SubordinateConfig.prototype.certificateAuthority = ""; + + /** + * SubordinateConfig pemIssuerChain. + * @member {google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain|null|undefined} pemIssuerChain + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @instance + */ + SubordinateConfig.prototype.pemIssuerChain = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SubordinateConfig subordinateConfig. + * @member {"certificateAuthority"|"pemIssuerChain"|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @instance + */ + Object.defineProperty(SubordinateConfig.prototype, "subordinateConfig", { + get: $util.oneOfGetter($oneOfFields = ["certificateAuthority", "pemIssuerChain"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SubordinateConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubordinateConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig} SubordinateConfig instance + */ + SubordinateConfig.create = function create(properties) { + return new SubordinateConfig(properties); + }; + + /** + * Encodes the specified SubordinateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubordinateConfig} message SubordinateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateAuthority != null && Object.hasOwnProperty.call(message, "certificateAuthority")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.certificateAuthority); + if (message.pemIssuerChain != null && Object.hasOwnProperty.call(message, "pemIssuerChain")) + $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.encode(message.pemIssuerChain, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubordinateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubordinateConfig} message SubordinateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig} SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.SubordinateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateAuthority = reader.string(); + break; + case 2: + message.pemIssuerChain = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig} SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubordinateConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubordinateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + properties.subordinateConfig = 1; + if (!$util.isString(message.certificateAuthority)) + return "certificateAuthority: string expected"; + } + if (message.pemIssuerChain != null && message.hasOwnProperty("pemIssuerChain")) { + if (properties.subordinateConfig === 1) + return "subordinateConfig: multiple values"; + properties.subordinateConfig = 1; + { + var error = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.verify(message.pemIssuerChain); + if (error) + return "pemIssuerChain." + error; + } + } + return null; + }; + + /** + * Creates a SubordinateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig} SubordinateConfig + */ + SubordinateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.SubordinateConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.SubordinateConfig(); + if (object.certificateAuthority != null) + message.certificateAuthority = String(object.certificateAuthority); + if (object.pemIssuerChain != null) { + if (typeof object.pemIssuerChain !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.SubordinateConfig.pemIssuerChain: object expected"); + message.pemIssuerChain = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.fromObject(object.pemIssuerChain); + } + return message; + }; + + /** + * Creates a plain object from a SubordinateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig} message SubordinateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubordinateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + object.certificateAuthority = message.certificateAuthority; + if (options.oneofs) + object.subordinateConfig = "certificateAuthority"; + } + if (message.pemIssuerChain != null && message.hasOwnProperty("pemIssuerChain")) { + object.pemIssuerChain = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.toObject(message.pemIssuerChain, options); + if (options.oneofs) + object.subordinateConfig = "pemIssuerChain"; + } + return object; + }; + + /** + * Converts this SubordinateConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @instance + * @returns {Object.} JSON object + */ + SubordinateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SubordinateConfig.SubordinateConfigChain = (function() { + + /** + * Properties of a SubordinateConfigChain. + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @interface ISubordinateConfigChain + * @property {Array.|null} [pemCertificates] SubordinateConfigChain pemCertificates + */ + + /** + * Constructs a new SubordinateConfigChain. + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @classdesc Represents a SubordinateConfigChain. + * @implements ISubordinateConfigChain + * @constructor + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain=} [properties] Properties to set + */ + function SubordinateConfigChain(properties) { + this.pemCertificates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubordinateConfigChain pemCertificates. + * @member {Array.} pemCertificates + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @instance + */ + SubordinateConfigChain.prototype.pemCertificates = $util.emptyArray; + + /** + * Creates a new SubordinateConfigChain instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain instance + */ + SubordinateConfigChain.create = function create(properties) { + return new SubordinateConfigChain(properties); + }; + + /** + * Encodes the specified SubordinateConfigChain message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain} message SubordinateConfigChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfigChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pemCertificates != null && message.pemCertificates.length) + for (var i = 0; i < message.pemCertificates.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pemCertificates[i]); + return writer; + }; + + /** + * Encodes the specified SubordinateConfigChain message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain} message SubordinateConfigChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfigChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfigChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pemCertificates && message.pemCertificates.length)) + message.pemCertificates = []; + message.pemCertificates.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfigChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubordinateConfigChain message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubordinateConfigChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pemCertificates != null && message.hasOwnProperty("pemCertificates")) { + if (!Array.isArray(message.pemCertificates)) + return "pemCertificates: array expected"; + for (var i = 0; i < message.pemCertificates.length; ++i) + if (!$util.isString(message.pemCertificates[i])) + return "pemCertificates: string[] expected"; + } + return null; + }; + + /** + * Creates a SubordinateConfigChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain + */ + SubordinateConfigChain.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain(); + if (object.pemCertificates) { + if (!Array.isArray(object.pemCertificates)) + throw TypeError(".google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.pemCertificates: array expected"); + message.pemCertificates = []; + for (var i = 0; i < object.pemCertificates.length; ++i) + message.pemCertificates[i] = String(object.pemCertificates[i]); + } + return message; + }; + + /** + * Creates a plain object from a SubordinateConfigChain message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain} message SubordinateConfigChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubordinateConfigChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pemCertificates = []; + if (message.pemCertificates && message.pemCertificates.length) { + object.pemCertificates = []; + for (var j = 0; j < message.pemCertificates.length; ++j) + object.pemCertificates[j] = message.pemCertificates[j]; + } + return object; + }; + + /** + * Converts this SubordinateConfigChain to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @instance + * @returns {Object.} JSON object + */ + SubordinateConfigChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubordinateConfigChain; + })(); + + return SubordinateConfig; + })(); + + v1beta1.PublicKey = (function() { + + /** + * Properties of a PublicKey. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IPublicKey + * @property {google.cloud.security.privateca.v1beta1.PublicKey.KeyType|null} [type] PublicKey type + * @property {Uint8Array|null} [key] PublicKey key + */ + + /** + * Constructs a new PublicKey. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey type. + * @member {google.cloud.security.privateca.v1beta1.PublicKey.KeyType} type + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @instance + */ + PublicKey.prototype.type = 0; + + /** + * PublicKey key. + * @member {Uint8Array} key + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @instance + */ + PublicKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1beta1.IPublicKey=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.PublicKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1beta1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1beta1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.PublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.int32(); + break; + case 2: + message.key = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.PublicKey) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.PublicKey(); + switch (object.type) { + case "KEY_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PEM_RSA_KEY": + case 1: + message.type = 1; + break; + case "PEM_EC_KEY": + case 2: + message.type = 2; + break; + } + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1beta1.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "KEY_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.PublicKey.KeyType[message.type] : message.type; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * KeyType enum. + * @name google.cloud.security.privateca.v1beta1.PublicKey.KeyType + * @enum {number} + * @property {number} KEY_TYPE_UNSPECIFIED=0 KEY_TYPE_UNSPECIFIED value + * @property {number} PEM_RSA_KEY=1 PEM_RSA_KEY value + * @property {number} PEM_EC_KEY=2 PEM_EC_KEY value + */ + PublicKey.KeyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PEM_RSA_KEY"] = 1; + values[valuesById[2] = "PEM_EC_KEY"] = 2; + return values; + })(); + + return PublicKey; + })(); + + v1beta1.CertificateConfig = (function() { + + /** + * Properties of a CertificateConfig. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICertificateConfig + * @property {google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig|null} [subjectConfig] CertificateConfig subjectConfig + * @property {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null} [reusableConfig] CertificateConfig reusableConfig + * @property {google.cloud.security.privateca.v1beta1.IPublicKey|null} [publicKey] CertificateConfig publicKey + */ + + /** + * Constructs a new CertificateConfig. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CertificateConfig. + * @implements ICertificateConfig + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICertificateConfig=} [properties] Properties to set + */ + function CertificateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateConfig subjectConfig. + * @member {google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig|null|undefined} subjectConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @instance + */ + CertificateConfig.prototype.subjectConfig = null; + + /** + * CertificateConfig reusableConfig. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null|undefined} reusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @instance + */ + CertificateConfig.prototype.reusableConfig = null; + + /** + * CertificateConfig publicKey. + * @member {google.cloud.security.privateca.v1beta1.IPublicKey|null|undefined} publicKey + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @instance + */ + CertificateConfig.prototype.publicKey = null; + + /** + * Creates a new CertificateConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig} CertificateConfig instance + */ + CertificateConfig.create = function create(properties) { + return new CertificateConfig(properties); + }; + + /** + * Encodes the specified CertificateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateConfig} message CertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subjectConfig != null && Object.hasOwnProperty.call(message, "subjectConfig")) + $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.encode(message.subjectConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.reusableConfig != null && Object.hasOwnProperty.call(message, "reusableConfig")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.encode(message.reusableConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.cloud.security.privateca.v1beta1.PublicKey.encode(message.publicKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateConfig} message CertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig} CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subjectConfig = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.decode(reader, reader.uint32()); + break; + case 2: + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32()); + break; + case 3: + message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig} CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subjectConfig != null && message.hasOwnProperty("subjectConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.verify(message.subjectConfig); + if (error) + return "subjectConfig." + error; + } + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.verify(message.reusableConfig); + if (error) + return "reusableConfig." + error; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.cloud.security.privateca.v1beta1.PublicKey.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + return null; + }; + + /** + * Creates a CertificateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig} CertificateConfig + */ + CertificateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateConfig(); + if (object.subjectConfig != null) { + if (typeof object.subjectConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateConfig.subjectConfig: object expected"); + message.subjectConfig = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.fromObject(object.subjectConfig); + } + if (object.reusableConfig != null) { + if (typeof object.reusableConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateConfig.reusableConfig: object expected"); + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.fromObject(object.reusableConfig); + } + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateConfig.publicKey: object expected"); + message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.fromObject(object.publicKey); + } + return message; + }; + + /** + * Creates a plain object from a CertificateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateConfig} message CertificateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subjectConfig = null; + object.reusableConfig = null; + object.publicKey = null; + } + if (message.subjectConfig != null && message.hasOwnProperty("subjectConfig")) + object.subjectConfig = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.toObject(message.subjectConfig, options); + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) + object.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.toObject(message.reusableConfig, options); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.toObject(message.publicKey, options); + return object; + }; + + /** + * Converts this CertificateConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @instance + * @returns {Object.} JSON object + */ + CertificateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateConfig.SubjectConfig = (function() { + + /** + * Properties of a SubjectConfig. + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @interface ISubjectConfig + * @property {google.cloud.security.privateca.v1beta1.ISubject|null} [subject] SubjectConfig subject + * @property {string|null} [commonName] SubjectConfig commonName + * @property {google.cloud.security.privateca.v1beta1.ISubjectAltNames|null} [subjectAltName] SubjectConfig subjectAltName + */ + + /** + * Constructs a new SubjectConfig. + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @classdesc Represents a SubjectConfig. + * @implements ISubjectConfig + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig=} [properties] Properties to set + */ + function SubjectConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubjectConfig subject. + * @member {google.cloud.security.privateca.v1beta1.ISubject|null|undefined} subject + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @instance + */ + SubjectConfig.prototype.subject = null; + + /** + * SubjectConfig commonName. + * @member {string} commonName + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @instance + */ + SubjectConfig.prototype.commonName = ""; + + /** + * SubjectConfig subjectAltName. + * @member {google.cloud.security.privateca.v1beta1.ISubjectAltNames|null|undefined} subjectAltName + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @instance + */ + SubjectConfig.prototype.subjectAltName = null; + + /** + * Creates a new SubjectConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} SubjectConfig instance + */ + SubjectConfig.create = function create(properties) { + return new SubjectConfig(properties); + }; + + /** + * Encodes the specified SubjectConfig message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig} message SubjectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + $root.google.cloud.security.privateca.v1beta1.Subject.encode(message.subject, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commonName != null && Object.hasOwnProperty.call(message, "commonName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commonName); + if (message.subjectAltName != null && Object.hasOwnProperty.call(message, "subjectAltName")) + $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.encode(message.subjectAltName, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubjectConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateConfig.ISubjectConfig} message SubjectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32()); + break; + case 2: + message.commonName = reader.string(); + break; + case 3: + message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubjectConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubjectConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + var error = $root.google.cloud.security.privateca.v1beta1.Subject.verify(message.subject); + if (error) + return "subject." + error; + } + if (message.commonName != null && message.hasOwnProperty("commonName")) + if (!$util.isString(message.commonName)) + return "commonName: string expected"; + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) { + var error = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.verify(message.subjectAltName); + if (error) + return "subjectAltName." + error; + } + return null; + }; + + /** + * Creates a SubjectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} SubjectConfig + */ + SubjectConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig(); + if (object.subject != null) { + if (typeof object.subject !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.subject: object expected"); + message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.fromObject(object.subject); + } + if (object.commonName != null) + message.commonName = String(object.commonName); + if (object.subjectAltName != null) { + if (typeof object.subjectAltName !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.subjectAltName: object expected"); + message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.fromObject(object.subjectAltName); + } + return message; + }; + + /** + * Creates a plain object from a SubjectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig} message SubjectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubjectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subject = null; + object.commonName = ""; + object.subjectAltName = null; + } + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = $root.google.cloud.security.privateca.v1beta1.Subject.toObject(message.subject, options); + if (message.commonName != null && message.hasOwnProperty("commonName")) + object.commonName = message.commonName; + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) + object.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.toObject(message.subjectAltName, options); + return object; + }; + + /** + * Converts this SubjectConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @instance + * @returns {Object.} JSON object + */ + SubjectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubjectConfig; + })(); + + return CertificateConfig; + })(); + + v1beta1.CertificateDescription = (function() { + + /** + * Properties of a CertificateDescription. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICertificateDescription + * @property {google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription|null} [subjectDescription] CertificateDescription subjectDescription + * @property {google.cloud.security.privateca.v1beta1.IReusableConfigValues|null} [configValues] CertificateDescription configValues + * @property {google.cloud.security.privateca.v1beta1.IPublicKey|null} [publicKey] CertificateDescription publicKey + * @property {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null} [subjectKeyId] CertificateDescription subjectKeyId + * @property {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null} [authorityKeyId] CertificateDescription authorityKeyId + * @property {Array.|null} [crlDistributionPoints] CertificateDescription crlDistributionPoints + * @property {Array.|null} [aiaIssuingCertificateUrls] CertificateDescription aiaIssuingCertificateUrls + * @property {google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint|null} [certFingerprint] CertificateDescription certFingerprint + */ + + /** + * Constructs a new CertificateDescription. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CertificateDescription. + * @implements ICertificateDescription + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICertificateDescription=} [properties] Properties to set + */ + function CertificateDescription(properties) { + this.crlDistributionPoints = []; + this.aiaIssuingCertificateUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateDescription subjectDescription. + * @member {google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription|null|undefined} subjectDescription + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.subjectDescription = null; + + /** + * CertificateDescription configValues. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfigValues|null|undefined} configValues + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.configValues = null; + + /** + * CertificateDescription publicKey. + * @member {google.cloud.security.privateca.v1beta1.IPublicKey|null|undefined} publicKey + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.publicKey = null; + + /** + * CertificateDescription subjectKeyId. + * @member {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null|undefined} subjectKeyId + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.subjectKeyId = null; + + /** + * CertificateDescription authorityKeyId. + * @member {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId|null|undefined} authorityKeyId + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.authorityKeyId = null; + + /** + * CertificateDescription crlDistributionPoints. + * @member {Array.} crlDistributionPoints + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.crlDistributionPoints = $util.emptyArray; + + /** + * CertificateDescription aiaIssuingCertificateUrls. + * @member {Array.} aiaIssuingCertificateUrls + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.aiaIssuingCertificateUrls = $util.emptyArray; + + /** + * CertificateDescription certFingerprint. + * @member {google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint|null|undefined} certFingerprint + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.certFingerprint = null; + + /** + * Creates a new CertificateDescription instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateDescription=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription} CertificateDescription instance + */ + CertificateDescription.create = function create(properties) { + return new CertificateDescription(properties); + }; + + /** + * Encodes the specified CertificateDescription message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateDescription} message CertificateDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subjectDescription != null && Object.hasOwnProperty.call(message, "subjectDescription")) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.encode(message.subjectDescription, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.configValues != null && Object.hasOwnProperty.call(message, "configValues")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.encode(message.configValues, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.cloud.security.privateca.v1beta1.PublicKey.encode(message.publicKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.subjectKeyId != null && Object.hasOwnProperty.call(message, "subjectKeyId")) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.encode(message.subjectKeyId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.authorityKeyId != null && Object.hasOwnProperty.call(message, "authorityKeyId")) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.encode(message.authorityKeyId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.crlDistributionPoints != null && message.crlDistributionPoints.length) + for (var i = 0; i < message.crlDistributionPoints.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.crlDistributionPoints[i]); + if (message.aiaIssuingCertificateUrls != null && message.aiaIssuingCertificateUrls.length) + for (var i = 0; i < message.aiaIssuingCertificateUrls.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.aiaIssuingCertificateUrls[i]); + if (message.certFingerprint != null && Object.hasOwnProperty.call(message, "certFingerprint")) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.encode(message.certFingerprint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateDescription} message CertificateDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription} CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateDescription.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subjectDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.decode(reader, reader.uint32()); + break; + case 2: + message.configValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); + break; + case 3: + message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.decode(reader, reader.uint32()); + break; + case 4: + message.subjectKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + case 5: + message.authorityKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.crlDistributionPoints && message.crlDistributionPoints.length)) + message.crlDistributionPoints = []; + message.crlDistributionPoints.push(reader.string()); + break; + case 7: + if (!(message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length)) + message.aiaIssuingCertificateUrls = []; + message.aiaIssuingCertificateUrls.push(reader.string()); + break; + case 8: + message.certFingerprint = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription} CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateDescription message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateDescription.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subjectDescription != null && message.hasOwnProperty("subjectDescription")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.verify(message.subjectDescription); + if (error) + return "subjectDescription." + error; + } + if (message.configValues != null && message.hasOwnProperty("configValues")) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.verify(message.configValues); + if (error) + return "configValues." + error; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.cloud.security.privateca.v1beta1.PublicKey.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.subjectKeyId != null && message.hasOwnProperty("subjectKeyId")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.verify(message.subjectKeyId); + if (error) + return "subjectKeyId." + error; + } + if (message.authorityKeyId != null && message.hasOwnProperty("authorityKeyId")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.verify(message.authorityKeyId); + if (error) + return "authorityKeyId." + error; + } + if (message.crlDistributionPoints != null && message.hasOwnProperty("crlDistributionPoints")) { + if (!Array.isArray(message.crlDistributionPoints)) + return "crlDistributionPoints: array expected"; + for (var i = 0; i < message.crlDistributionPoints.length; ++i) + if (!$util.isString(message.crlDistributionPoints[i])) + return "crlDistributionPoints: string[] expected"; + } + if (message.aiaIssuingCertificateUrls != null && message.hasOwnProperty("aiaIssuingCertificateUrls")) { + if (!Array.isArray(message.aiaIssuingCertificateUrls)) + return "aiaIssuingCertificateUrls: array expected"; + for (var i = 0; i < message.aiaIssuingCertificateUrls.length; ++i) + if (!$util.isString(message.aiaIssuingCertificateUrls[i])) + return "aiaIssuingCertificateUrls: string[] expected"; + } + if (message.certFingerprint != null && message.hasOwnProperty("certFingerprint")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.verify(message.certFingerprint); + if (error) + return "certFingerprint." + error; + } + return null; + }; + + /** + * Creates a CertificateDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription} CertificateDescription + */ + CertificateDescription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateDescription) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription(); + if (object.subjectDescription != null) { + if (typeof object.subjectDescription !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.subjectDescription: object expected"); + message.subjectDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.fromObject(object.subjectDescription); + } + if (object.configValues != null) { + if (typeof object.configValues !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.configValues: object expected"); + message.configValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.fromObject(object.configValues); + } + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.publicKey: object expected"); + message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.fromObject(object.publicKey); + } + if (object.subjectKeyId != null) { + if (typeof object.subjectKeyId !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.subjectKeyId: object expected"); + message.subjectKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.fromObject(object.subjectKeyId); + } + if (object.authorityKeyId != null) { + if (typeof object.authorityKeyId !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.authorityKeyId: object expected"); + message.authorityKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.fromObject(object.authorityKeyId); + } + if (object.crlDistributionPoints) { + if (!Array.isArray(object.crlDistributionPoints)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.crlDistributionPoints: array expected"); + message.crlDistributionPoints = []; + for (var i = 0; i < object.crlDistributionPoints.length; ++i) + message.crlDistributionPoints[i] = String(object.crlDistributionPoints[i]); + } + if (object.aiaIssuingCertificateUrls) { + if (!Array.isArray(object.aiaIssuingCertificateUrls)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.aiaIssuingCertificateUrls: array expected"); + message.aiaIssuingCertificateUrls = []; + for (var i = 0; i < object.aiaIssuingCertificateUrls.length; ++i) + message.aiaIssuingCertificateUrls[i] = String(object.aiaIssuingCertificateUrls[i]); + } + if (object.certFingerprint != null) { + if (typeof object.certFingerprint !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.certFingerprint: object expected"); + message.certFingerprint = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.fromObject(object.certFingerprint); + } + return message; + }; + + /** + * Creates a plain object from a CertificateDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription} message CertificateDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.crlDistributionPoints = []; + object.aiaIssuingCertificateUrls = []; + } + if (options.defaults) { + object.subjectDescription = null; + object.configValues = null; + object.publicKey = null; + object.subjectKeyId = null; + object.authorityKeyId = null; + object.certFingerprint = null; + } + if (message.subjectDescription != null && message.hasOwnProperty("subjectDescription")) + object.subjectDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.toObject(message.subjectDescription, options); + if (message.configValues != null && message.hasOwnProperty("configValues")) + object.configValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.toObject(message.configValues, options); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.toObject(message.publicKey, options); + if (message.subjectKeyId != null && message.hasOwnProperty("subjectKeyId")) + object.subjectKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.toObject(message.subjectKeyId, options); + if (message.authorityKeyId != null && message.hasOwnProperty("authorityKeyId")) + object.authorityKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.toObject(message.authorityKeyId, options); + if (message.crlDistributionPoints && message.crlDistributionPoints.length) { + object.crlDistributionPoints = []; + for (var j = 0; j < message.crlDistributionPoints.length; ++j) + object.crlDistributionPoints[j] = message.crlDistributionPoints[j]; + } + if (message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length) { + object.aiaIssuingCertificateUrls = []; + for (var j = 0; j < message.aiaIssuingCertificateUrls.length; ++j) + object.aiaIssuingCertificateUrls[j] = message.aiaIssuingCertificateUrls[j]; + } + if (message.certFingerprint != null && message.hasOwnProperty("certFingerprint")) + object.certFingerprint = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.toObject(message.certFingerprint, options); + return object; + }; + + /** + * Converts this CertificateDescription to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @instance + * @returns {Object.} JSON object + */ + CertificateDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateDescription.SubjectDescription = (function() { + + /** + * Properties of a SubjectDescription. + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @interface ISubjectDescription + * @property {google.cloud.security.privateca.v1beta1.ISubject|null} [subject] SubjectDescription subject + * @property {string|null} [commonName] SubjectDescription commonName + * @property {google.cloud.security.privateca.v1beta1.ISubjectAltNames|null} [subjectAltName] SubjectDescription subjectAltName + * @property {string|null} [hexSerialNumber] SubjectDescription hexSerialNumber + * @property {google.protobuf.IDuration|null} [lifetime] SubjectDescription lifetime + * @property {google.protobuf.ITimestamp|null} [notBeforeTime] SubjectDescription notBeforeTime + * @property {google.protobuf.ITimestamp|null} [notAfterTime] SubjectDescription notAfterTime + */ + + /** + * Constructs a new SubjectDescription. + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @classdesc Represents a SubjectDescription. + * @implements ISubjectDescription + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription=} [properties] Properties to set + */ + function SubjectDescription(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubjectDescription subject. + * @member {google.cloud.security.privateca.v1beta1.ISubject|null|undefined} subject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.subject = null; + + /** + * SubjectDescription commonName. + * @member {string} commonName + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.commonName = ""; + + /** + * SubjectDescription subjectAltName. + * @member {google.cloud.security.privateca.v1beta1.ISubjectAltNames|null|undefined} subjectAltName + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.subjectAltName = null; + + /** + * SubjectDescription hexSerialNumber. + * @member {string} hexSerialNumber + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.hexSerialNumber = ""; + + /** + * SubjectDescription lifetime. + * @member {google.protobuf.IDuration|null|undefined} lifetime + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.lifetime = null; + + /** + * SubjectDescription notBeforeTime. + * @member {google.protobuf.ITimestamp|null|undefined} notBeforeTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.notBeforeTime = null; + + /** + * SubjectDescription notAfterTime. + * @member {google.protobuf.ITimestamp|null|undefined} notAfterTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.notAfterTime = null; + + /** + * Creates a new SubjectDescription instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} SubjectDescription instance + */ + SubjectDescription.create = function create(properties) { + return new SubjectDescription(properties); + }; + + /** + * Encodes the specified SubjectDescription message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription} message SubjectDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + $root.google.cloud.security.privateca.v1beta1.Subject.encode(message.subject, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commonName != null && Object.hasOwnProperty.call(message, "commonName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.commonName); + if (message.subjectAltName != null && Object.hasOwnProperty.call(message, "subjectAltName")) + $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.encode(message.subjectAltName, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.hexSerialNumber != null && Object.hasOwnProperty.call(message, "hexSerialNumber")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.hexSerialNumber); + if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.notBeforeTime != null && Object.hasOwnProperty.call(message, "notBeforeTime")) + $root.google.protobuf.Timestamp.encode(message.notBeforeTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.notAfterTime != null && Object.hasOwnProperty.call(message, "notAfterTime")) + $root.google.protobuf.Timestamp.encode(message.notAfterTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubjectDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ISubjectDescription} message SubjectDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectDescription.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32()); + break; + case 2: + message.commonName = reader.string(); + break; + case 3: + message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.decode(reader, reader.uint32()); + break; + case 4: + message.hexSerialNumber = reader.string(); + break; + case 5: + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubjectDescription message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubjectDescription.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + var error = $root.google.cloud.security.privateca.v1beta1.Subject.verify(message.subject); + if (error) + return "subject." + error; + } + if (message.commonName != null && message.hasOwnProperty("commonName")) + if (!$util.isString(message.commonName)) + return "commonName: string expected"; + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) { + var error = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.verify(message.subjectAltName); + if (error) + return "subjectAltName." + error; + } + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + if (!$util.isString(message.hexSerialNumber)) + return "hexSerialNumber: string expected"; + if (message.lifetime != null && message.hasOwnProperty("lifetime")) { + var error = $root.google.protobuf.Duration.verify(message.lifetime); + if (error) + return "lifetime." + error; + } + if (message.notBeforeTime != null && message.hasOwnProperty("notBeforeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.notBeforeTime); + if (error) + return "notBeforeTime." + error; + } + if (message.notAfterTime != null && message.hasOwnProperty("notAfterTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.notAfterTime); + if (error) + return "notAfterTime." + error; + } + return null; + }; + + /** + * Creates a SubjectDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} SubjectDescription + */ + SubjectDescription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription(); + if (object.subject != null) { + if (typeof object.subject !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.subject: object expected"); + message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.fromObject(object.subject); + } + if (object.commonName != null) + message.commonName = String(object.commonName); + if (object.subjectAltName != null) { + if (typeof object.subjectAltName !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.subjectAltName: object expected"); + message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.fromObject(object.subjectAltName); + } + if (object.hexSerialNumber != null) + message.hexSerialNumber = String(object.hexSerialNumber); + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.notBeforeTime != null) { + if (typeof object.notBeforeTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.notBeforeTime: object expected"); + message.notBeforeTime = $root.google.protobuf.Timestamp.fromObject(object.notBeforeTime); + } + if (object.notAfterTime != null) { + if (typeof object.notAfterTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.notAfterTime: object expected"); + message.notAfterTime = $root.google.protobuf.Timestamp.fromObject(object.notAfterTime); + } + return message; + }; + + /** + * Creates a plain object from a SubjectDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription} message SubjectDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubjectDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subject = null; + object.commonName = ""; + object.subjectAltName = null; + object.hexSerialNumber = ""; + object.lifetime = null; + object.notBeforeTime = null; + object.notAfterTime = null; + } + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = $root.google.cloud.security.privateca.v1beta1.Subject.toObject(message.subject, options); + if (message.commonName != null && message.hasOwnProperty("commonName")) + object.commonName = message.commonName; + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) + object.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.toObject(message.subjectAltName, options); + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + object.hexSerialNumber = message.hexSerialNumber; + if (message.lifetime != null && message.hasOwnProperty("lifetime")) + object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); + if (message.notBeforeTime != null && message.hasOwnProperty("notBeforeTime")) + object.notBeforeTime = $root.google.protobuf.Timestamp.toObject(message.notBeforeTime, options); + if (message.notAfterTime != null && message.hasOwnProperty("notAfterTime")) + object.notAfterTime = $root.google.protobuf.Timestamp.toObject(message.notAfterTime, options); + return object; + }; + + /** + * Converts this SubjectDescription to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @instance + * @returns {Object.} JSON object + */ + SubjectDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubjectDescription; + })(); + + CertificateDescription.KeyId = (function() { + + /** + * Properties of a KeyId. + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @interface IKeyId + * @property {string|null} [keyId] KeyId keyId + */ + + /** + * Constructs a new KeyId. + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @classdesc Represents a KeyId. + * @implements IKeyId + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId=} [properties] Properties to set + */ + function KeyId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyId keyId. + * @member {string} keyId + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @instance + */ + KeyId.prototype.keyId = ""; + + /** + * Creates a new KeyId instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} KeyId instance + */ + KeyId.create = function create(properties) { + return new KeyId(properties); + }; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId} message KeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyId.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); + return writer; + }; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.IKeyId} message KeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyId.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyId message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyId.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"; + return null; + }; + + /** + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} KeyId + */ + KeyId.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId(); + if (object.keyId != null) + message.keyId = String(object.keyId); + return message; + }; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId} message KeyId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyId = ""; + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = message.keyId; + return object; + }; + + /** + * Converts this KeyId to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @instance + * @returns {Object.} JSON object + */ + KeyId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyId; + })(); + + CertificateDescription.CertificateFingerprint = (function() { + + /** + * Properties of a CertificateFingerprint. + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @interface ICertificateFingerprint + * @property {string|null} [sha256Hash] CertificateFingerprint sha256Hash + */ + + /** + * Constructs a new CertificateFingerprint. + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @classdesc Represents a CertificateFingerprint. + * @implements ICertificateFingerprint + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint=} [properties] Properties to set + */ + function CertificateFingerprint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateFingerprint sha256Hash. + * @member {string} sha256Hash + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @instance + */ + CertificateFingerprint.prototype.sha256Hash = ""; + + /** + * Creates a new CertificateFingerprint instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} CertificateFingerprint instance + */ + CertificateFingerprint.create = function create(properties) { + return new CertificateFingerprint(properties); + }; + + /** + * Encodes the specified CertificateFingerprint message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint} message CertificateFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateFingerprint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sha256Hash != null && Object.hasOwnProperty.call(message, "sha256Hash")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sha256Hash); + return writer; + }; + + /** + * Encodes the specified CertificateFingerprint message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.ICertificateFingerprint} message CertificateFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateFingerprint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateFingerprint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sha256Hash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateFingerprint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateFingerprint message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateFingerprint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sha256Hash != null && message.hasOwnProperty("sha256Hash")) + if (!$util.isString(message.sha256Hash)) + return "sha256Hash: string expected"; + return null; + }; + + /** + * Creates a CertificateFingerprint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} CertificateFingerprint + */ + CertificateFingerprint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint(); + if (object.sha256Hash != null) + message.sha256Hash = String(object.sha256Hash); + return message; + }; + + /** + * Creates a plain object from a CertificateFingerprint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint} message CertificateFingerprint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateFingerprint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sha256Hash = ""; + if (message.sha256Hash != null && message.hasOwnProperty("sha256Hash")) + object.sha256Hash = message.sha256Hash; + return object; + }; + + /** + * Converts this CertificateFingerprint to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @instance + * @returns {Object.} JSON object + */ + CertificateFingerprint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertificateFingerprint; + })(); + + return CertificateDescription; + })(); + + v1beta1.ObjectId = (function() { + + /** + * Properties of an ObjectId. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IObjectId + * @property {Array.|null} [objectIdPath] ObjectId objectIdPath + */ + + /** + * Constructs a new ObjectId. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an ObjectId. + * @implements IObjectId + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IObjectId=} [properties] Properties to set + */ + function ObjectId(properties) { + this.objectIdPath = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ObjectId objectIdPath. + * @member {Array.} objectIdPath + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @instance + */ + ObjectId.prototype.objectIdPath = $util.emptyArray; + + /** + * Creates a new ObjectId instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1beta1.IObjectId=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ObjectId} ObjectId instance + */ + ObjectId.create = function create(properties) { + return new ObjectId(properties); + }; + + /** + * Encodes the specified ObjectId message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ObjectId.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1beta1.IObjectId} message ObjectId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObjectId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.objectIdPath != null && message.objectIdPath.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.objectIdPath.length; ++i) + writer.int32(message.objectIdPath[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ObjectId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ObjectId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1beta1.IObjectId} message ObjectId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObjectId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ObjectId message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ObjectId} ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectId.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ObjectId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.objectIdPath && message.objectIdPath.length)) + message.objectIdPath = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.objectIdPath.push(reader.int32()); + } else + message.objectIdPath.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ObjectId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ObjectId} ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ObjectId message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ObjectId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.objectIdPath != null && message.hasOwnProperty("objectIdPath")) { + if (!Array.isArray(message.objectIdPath)) + return "objectIdPath: array expected"; + for (var i = 0; i < message.objectIdPath.length; ++i) + if (!$util.isInteger(message.objectIdPath[i])) + return "objectIdPath: integer[] expected"; + } + return null; + }; + + /** + * Creates an ObjectId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ObjectId} ObjectId + */ + ObjectId.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ObjectId) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ObjectId(); + if (object.objectIdPath) { + if (!Array.isArray(object.objectIdPath)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ObjectId.objectIdPath: array expected"); + message.objectIdPath = []; + for (var i = 0; i < object.objectIdPath.length; ++i) + message.objectIdPath[i] = object.objectIdPath[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from an ObjectId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1beta1.ObjectId} message ObjectId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ObjectId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.objectIdPath = []; + if (message.objectIdPath && message.objectIdPath.length) { + object.objectIdPath = []; + for (var j = 0; j < message.objectIdPath.length; ++j) + object.objectIdPath[j] = message.objectIdPath[j]; + } + return object; + }; + + /** + * Converts this ObjectId to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @instance + * @returns {Object.} JSON object + */ + ObjectId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ObjectId; + })(); + + v1beta1.X509Extension = (function() { + + /** + * Properties of a X509Extension. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IX509Extension + * @property {google.cloud.security.privateca.v1beta1.IObjectId|null} [objectId] X509Extension objectId + * @property {boolean|null} [critical] X509Extension critical + * @property {Uint8Array|null} [value] X509Extension value + */ + + /** + * Constructs a new X509Extension. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a X509Extension. + * @implements IX509Extension + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IX509Extension=} [properties] Properties to set + */ + function X509Extension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * X509Extension objectId. + * @member {google.cloud.security.privateca.v1beta1.IObjectId|null|undefined} objectId + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @instance + */ + X509Extension.prototype.objectId = null; + + /** + * X509Extension critical. + * @member {boolean} critical + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @instance + */ + X509Extension.prototype.critical = false; + + /** + * X509Extension value. + * @member {Uint8Array} value + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @instance + */ + X509Extension.prototype.value = $util.newBuffer([]); + + /** + * Creates a new X509Extension instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1beta1.IX509Extension=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.X509Extension} X509Extension instance + */ + X509Extension.create = function create(properties) { + return new X509Extension(properties); + }; + + /** + * Encodes the specified X509Extension message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.X509Extension.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1beta1.IX509Extension} message X509Extension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509Extension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId")) + $root.google.cloud.security.privateca.v1beta1.ObjectId.encode(message.objectId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.critical); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified X509Extension message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.X509Extension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1beta1.IX509Extension} message X509Extension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509Extension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a X509Extension message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.X509Extension} X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509Extension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.X509Extension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.objectId = $root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32()); + break; + case 2: + message.critical = reader.bool(); + break; + case 3: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a X509Extension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.X509Extension} X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509Extension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a X509Extension message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + X509Extension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.objectId != null && message.hasOwnProperty("objectId")) { + var error = $root.google.cloud.security.privateca.v1beta1.ObjectId.verify(message.objectId); + if (error) + return "objectId." + error; + } + if (message.critical != null && message.hasOwnProperty("critical")) + if (typeof message.critical !== "boolean") + return "critical: boolean 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 X509Extension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.X509Extension} X509Extension + */ + X509Extension.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.X509Extension) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.X509Extension(); + if (object.objectId != null) { + if (typeof object.objectId !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.X509Extension.objectId: object expected"); + message.objectId = $root.google.cloud.security.privateca.v1beta1.ObjectId.fromObject(object.objectId); + } + if (object.critical != null) + message.critical = Boolean(object.critical); + 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 X509Extension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1beta1.X509Extension} message X509Extension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + X509Extension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.objectId = null; + object.critical = false; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.objectId != null && message.hasOwnProperty("objectId")) + object.objectId = $root.google.cloud.security.privateca.v1beta1.ObjectId.toObject(message.objectId, options); + if (message.critical != null && message.hasOwnProperty("critical")) + object.critical = message.critical; + 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 X509Extension to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @instance + * @returns {Object.} JSON object + */ + X509Extension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return X509Extension; + })(); + + v1beta1.KeyUsage = (function() { + + /** + * Properties of a KeyUsage. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IKeyUsage + * @property {google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions|null} [baseKeyUsage] KeyUsage baseKeyUsage + * @property {google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions|null} [extendedKeyUsage] KeyUsage extendedKeyUsage + * @property {Array.|null} [unknownExtendedKeyUsages] KeyUsage unknownExtendedKeyUsages + */ + + /** + * Constructs a new KeyUsage. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a KeyUsage. + * @implements IKeyUsage + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IKeyUsage=} [properties] Properties to set + */ + function KeyUsage(properties) { + this.unknownExtendedKeyUsages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyUsage baseKeyUsage. + * @member {google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions|null|undefined} baseKeyUsage + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @instance + */ + KeyUsage.prototype.baseKeyUsage = null; + + /** + * KeyUsage extendedKeyUsage. + * @member {google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions|null|undefined} extendedKeyUsage + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @instance + */ + KeyUsage.prototype.extendedKeyUsage = null; + + /** + * KeyUsage unknownExtendedKeyUsages. + * @member {Array.} unknownExtendedKeyUsages + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @instance + */ + KeyUsage.prototype.unknownExtendedKeyUsages = $util.emptyArray; + + /** + * Creates a new KeyUsage instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1beta1.IKeyUsage=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage} KeyUsage instance + */ + KeyUsage.create = function create(properties) { + return new KeyUsage(properties); + }; + + /** + * Encodes the specified KeyUsage message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1beta1.IKeyUsage} message KeyUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseKeyUsage != null && Object.hasOwnProperty.call(message, "baseKeyUsage")) + $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.encode(message.baseKeyUsage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.extendedKeyUsage != null && Object.hasOwnProperty.call(message, "extendedKeyUsage")) + $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.encode(message.extendedKeyUsage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.unknownExtendedKeyUsages != null && message.unknownExtendedKeyUsages.length) + for (var i = 0; i < message.unknownExtendedKeyUsages.length; ++i) + $root.google.cloud.security.privateca.v1beta1.ObjectId.encode(message.unknownExtendedKeyUsages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KeyUsage message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1beta1.IKeyUsage} message KeyUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyUsage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage} KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.KeyUsage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.decode(reader, reader.uint32()); + break; + case 2: + message.extendedKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length)) + message.unknownExtendedKeyUsages = []; + message.unknownExtendedKeyUsages.push($root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage} KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyUsage message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyUsage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseKeyUsage != null && message.hasOwnProperty("baseKeyUsage")) { + var error = $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.verify(message.baseKeyUsage); + if (error) + return "baseKeyUsage." + error; + } + if (message.extendedKeyUsage != null && message.hasOwnProperty("extendedKeyUsage")) { + var error = $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.verify(message.extendedKeyUsage); + if (error) + return "extendedKeyUsage." + error; + } + if (message.unknownExtendedKeyUsages != null && message.hasOwnProperty("unknownExtendedKeyUsages")) { + if (!Array.isArray(message.unknownExtendedKeyUsages)) + return "unknownExtendedKeyUsages: array expected"; + for (var i = 0; i < message.unknownExtendedKeyUsages.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.ObjectId.verify(message.unknownExtendedKeyUsages[i]); + if (error) + return "unknownExtendedKeyUsages." + error; + } + } + return null; + }; + + /** + * Creates a KeyUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage} KeyUsage + */ + KeyUsage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.KeyUsage) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.KeyUsage(); + if (object.baseKeyUsage != null) { + if (typeof object.baseKeyUsage !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.KeyUsage.baseKeyUsage: object expected"); + message.baseKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.fromObject(object.baseKeyUsage); + } + if (object.extendedKeyUsage != null) { + if (typeof object.extendedKeyUsage !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.KeyUsage.extendedKeyUsage: object expected"); + message.extendedKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.fromObject(object.extendedKeyUsage); + } + if (object.unknownExtendedKeyUsages) { + if (!Array.isArray(object.unknownExtendedKeyUsages)) + throw TypeError(".google.cloud.security.privateca.v1beta1.KeyUsage.unknownExtendedKeyUsages: array expected"); + message.unknownExtendedKeyUsages = []; + for (var i = 0; i < object.unknownExtendedKeyUsages.length; ++i) { + if (typeof object.unknownExtendedKeyUsages[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.KeyUsage.unknownExtendedKeyUsages: object expected"); + message.unknownExtendedKeyUsages[i] = $root.google.cloud.security.privateca.v1beta1.ObjectId.fromObject(object.unknownExtendedKeyUsages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a KeyUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage} message KeyUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyUsage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.unknownExtendedKeyUsages = []; + if (options.defaults) { + object.baseKeyUsage = null; + object.extendedKeyUsage = null; + } + if (message.baseKeyUsage != null && message.hasOwnProperty("baseKeyUsage")) + object.baseKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.toObject(message.baseKeyUsage, options); + if (message.extendedKeyUsage != null && message.hasOwnProperty("extendedKeyUsage")) + object.extendedKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.toObject(message.extendedKeyUsage, options); + if (message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length) { + object.unknownExtendedKeyUsages = []; + for (var j = 0; j < message.unknownExtendedKeyUsages.length; ++j) + object.unknownExtendedKeyUsages[j] = $root.google.cloud.security.privateca.v1beta1.ObjectId.toObject(message.unknownExtendedKeyUsages[j], options); + } + return object; + }; + + /** + * Converts this KeyUsage to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @instance + * @returns {Object.} JSON object + */ + KeyUsage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + KeyUsage.KeyUsageOptions = (function() { + + /** + * Properties of a KeyUsageOptions. + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @interface IKeyUsageOptions + * @property {boolean|null} [digitalSignature] KeyUsageOptions digitalSignature + * @property {boolean|null} [contentCommitment] KeyUsageOptions contentCommitment + * @property {boolean|null} [keyEncipherment] KeyUsageOptions keyEncipherment + * @property {boolean|null} [dataEncipherment] KeyUsageOptions dataEncipherment + * @property {boolean|null} [keyAgreement] KeyUsageOptions keyAgreement + * @property {boolean|null} [certSign] KeyUsageOptions certSign + * @property {boolean|null} [crlSign] KeyUsageOptions crlSign + * @property {boolean|null} [encipherOnly] KeyUsageOptions encipherOnly + * @property {boolean|null} [decipherOnly] KeyUsageOptions decipherOnly + */ + + /** + * Constructs a new KeyUsageOptions. + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @classdesc Represents a KeyUsageOptions. + * @implements IKeyUsageOptions + * @constructor + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions=} [properties] Properties to set + */ + function KeyUsageOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyUsageOptions digitalSignature. + * @member {boolean} digitalSignature + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.digitalSignature = false; + + /** + * KeyUsageOptions contentCommitment. + * @member {boolean} contentCommitment + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.contentCommitment = false; + + /** + * KeyUsageOptions keyEncipherment. + * @member {boolean} keyEncipherment + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.keyEncipherment = false; + + /** + * KeyUsageOptions dataEncipherment. + * @member {boolean} dataEncipherment + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.dataEncipherment = false; + + /** + * KeyUsageOptions keyAgreement. + * @member {boolean} keyAgreement + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.keyAgreement = false; + + /** + * KeyUsageOptions certSign. + * @member {boolean} certSign + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.certSign = false; + + /** + * KeyUsageOptions crlSign. + * @member {boolean} crlSign + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.crlSign = false; + + /** + * KeyUsageOptions encipherOnly. + * @member {boolean} encipherOnly + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.encipherOnly = false; + + /** + * KeyUsageOptions decipherOnly. + * @member {boolean} decipherOnly + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.decipherOnly = false; + + /** + * Creates a new KeyUsageOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} KeyUsageOptions instance + */ + KeyUsageOptions.create = function create(properties) { + return new KeyUsageOptions(properties); + }; + + /** + * Encodes the specified KeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions} message KeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.digitalSignature != null && Object.hasOwnProperty.call(message, "digitalSignature")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.digitalSignature); + if (message.contentCommitment != null && Object.hasOwnProperty.call(message, "contentCommitment")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.contentCommitment); + if (message.keyEncipherment != null && Object.hasOwnProperty.call(message, "keyEncipherment")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.keyEncipherment); + if (message.dataEncipherment != null && Object.hasOwnProperty.call(message, "dataEncipherment")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dataEncipherment); + if (message.keyAgreement != null && Object.hasOwnProperty.call(message, "keyAgreement")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.keyAgreement); + if (message.certSign != null && Object.hasOwnProperty.call(message, "certSign")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.certSign); + if (message.crlSign != null && Object.hasOwnProperty.call(message, "crlSign")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.crlSign); + if (message.encipherOnly != null && Object.hasOwnProperty.call(message, "encipherOnly")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.encipherOnly); + if (message.decipherOnly != null && Object.hasOwnProperty.call(message, "decipherOnly")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.decipherOnly); + return writer; + }; + + /** + * Encodes the specified KeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IKeyUsageOptions} message KeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.digitalSignature = reader.bool(); + break; + case 2: + message.contentCommitment = reader.bool(); + break; + case 3: + message.keyEncipherment = reader.bool(); + break; + case 4: + message.dataEncipherment = reader.bool(); + break; + case 5: + message.keyAgreement = reader.bool(); + break; + case 6: + message.certSign = reader.bool(); + break; + case 7: + message.crlSign = reader.bool(); + break; + case 8: + message.encipherOnly = reader.bool(); + break; + case 9: + message.decipherOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyUsageOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyUsageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.digitalSignature != null && message.hasOwnProperty("digitalSignature")) + if (typeof message.digitalSignature !== "boolean") + return "digitalSignature: boolean expected"; + if (message.contentCommitment != null && message.hasOwnProperty("contentCommitment")) + if (typeof message.contentCommitment !== "boolean") + return "contentCommitment: boolean expected"; + if (message.keyEncipherment != null && message.hasOwnProperty("keyEncipherment")) + if (typeof message.keyEncipherment !== "boolean") + return "keyEncipherment: boolean expected"; + if (message.dataEncipherment != null && message.hasOwnProperty("dataEncipherment")) + if (typeof message.dataEncipherment !== "boolean") + return "dataEncipherment: boolean expected"; + if (message.keyAgreement != null && message.hasOwnProperty("keyAgreement")) + if (typeof message.keyAgreement !== "boolean") + return "keyAgreement: boolean expected"; + if (message.certSign != null && message.hasOwnProperty("certSign")) + if (typeof message.certSign !== "boolean") + return "certSign: boolean expected"; + if (message.crlSign != null && message.hasOwnProperty("crlSign")) + if (typeof message.crlSign !== "boolean") + return "crlSign: boolean expected"; + if (message.encipherOnly != null && message.hasOwnProperty("encipherOnly")) + if (typeof message.encipherOnly !== "boolean") + return "encipherOnly: boolean expected"; + if (message.decipherOnly != null && message.hasOwnProperty("decipherOnly")) + if (typeof message.decipherOnly !== "boolean") + return "decipherOnly: boolean expected"; + return null; + }; + + /** + * Creates a KeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} KeyUsageOptions + */ + KeyUsageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions(); + if (object.digitalSignature != null) + message.digitalSignature = Boolean(object.digitalSignature); + if (object.contentCommitment != null) + message.contentCommitment = Boolean(object.contentCommitment); + if (object.keyEncipherment != null) + message.keyEncipherment = Boolean(object.keyEncipherment); + if (object.dataEncipherment != null) + message.dataEncipherment = Boolean(object.dataEncipherment); + if (object.keyAgreement != null) + message.keyAgreement = Boolean(object.keyAgreement); + if (object.certSign != null) + message.certSign = Boolean(object.certSign); + if (object.crlSign != null) + message.crlSign = Boolean(object.crlSign); + if (object.encipherOnly != null) + message.encipherOnly = Boolean(object.encipherOnly); + if (object.decipherOnly != null) + message.decipherOnly = Boolean(object.decipherOnly); + return message; + }; + + /** + * Creates a plain object from a KeyUsageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions} message KeyUsageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyUsageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.digitalSignature = false; + object.contentCommitment = false; + object.keyEncipherment = false; + object.dataEncipherment = false; + object.keyAgreement = false; + object.certSign = false; + object.crlSign = false; + object.encipherOnly = false; + object.decipherOnly = false; + } + if (message.digitalSignature != null && message.hasOwnProperty("digitalSignature")) + object.digitalSignature = message.digitalSignature; + if (message.contentCommitment != null && message.hasOwnProperty("contentCommitment")) + object.contentCommitment = message.contentCommitment; + if (message.keyEncipherment != null && message.hasOwnProperty("keyEncipherment")) + object.keyEncipherment = message.keyEncipherment; + if (message.dataEncipherment != null && message.hasOwnProperty("dataEncipherment")) + object.dataEncipherment = message.dataEncipherment; + if (message.keyAgreement != null && message.hasOwnProperty("keyAgreement")) + object.keyAgreement = message.keyAgreement; + if (message.certSign != null && message.hasOwnProperty("certSign")) + object.certSign = message.certSign; + if (message.crlSign != null && message.hasOwnProperty("crlSign")) + object.crlSign = message.crlSign; + if (message.encipherOnly != null && message.hasOwnProperty("encipherOnly")) + object.encipherOnly = message.encipherOnly; + if (message.decipherOnly != null && message.hasOwnProperty("decipherOnly")) + object.decipherOnly = message.decipherOnly; + return object; + }; + + /** + * Converts this KeyUsageOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @instance + * @returns {Object.} JSON object + */ + KeyUsageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyUsageOptions; + })(); + + KeyUsage.ExtendedKeyUsageOptions = (function() { + + /** + * Properties of an ExtendedKeyUsageOptions. + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @interface IExtendedKeyUsageOptions + * @property {boolean|null} [serverAuth] ExtendedKeyUsageOptions serverAuth + * @property {boolean|null} [clientAuth] ExtendedKeyUsageOptions clientAuth + * @property {boolean|null} [codeSigning] ExtendedKeyUsageOptions codeSigning + * @property {boolean|null} [emailProtection] ExtendedKeyUsageOptions emailProtection + * @property {boolean|null} [timeStamping] ExtendedKeyUsageOptions timeStamping + * @property {boolean|null} [ocspSigning] ExtendedKeyUsageOptions ocspSigning + */ + + /** + * Constructs a new ExtendedKeyUsageOptions. + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @classdesc Represents an ExtendedKeyUsageOptions. + * @implements IExtendedKeyUsageOptions + * @constructor + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions=} [properties] Properties to set + */ + function ExtendedKeyUsageOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtendedKeyUsageOptions serverAuth. + * @member {boolean} serverAuth + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.serverAuth = false; + + /** + * ExtendedKeyUsageOptions clientAuth. + * @member {boolean} clientAuth + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.clientAuth = false; + + /** + * ExtendedKeyUsageOptions codeSigning. + * @member {boolean} codeSigning + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.codeSigning = false; + + /** + * ExtendedKeyUsageOptions emailProtection. + * @member {boolean} emailProtection + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.emailProtection = false; + + /** + * ExtendedKeyUsageOptions timeStamping. + * @member {boolean} timeStamping + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.timeStamping = false; + + /** + * ExtendedKeyUsageOptions ocspSigning. + * @member {boolean} ocspSigning + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.ocspSigning = false; + + /** + * Creates a new ExtendedKeyUsageOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions instance + */ + ExtendedKeyUsageOptions.create = function create(properties) { + return new ExtendedKeyUsageOptions(properties); + }; + + /** + * Encodes the specified ExtendedKeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions} message ExtendedKeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedKeyUsageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serverAuth != null && Object.hasOwnProperty.call(message, "serverAuth")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.serverAuth); + if (message.clientAuth != null && Object.hasOwnProperty.call(message, "clientAuth")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clientAuth); + if (message.codeSigning != null && Object.hasOwnProperty.call(message, "codeSigning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.codeSigning); + if (message.emailProtection != null && Object.hasOwnProperty.call(message, "emailProtection")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.emailProtection); + if (message.timeStamping != null && Object.hasOwnProperty.call(message, "timeStamping")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.timeStamping); + if (message.ocspSigning != null && Object.hasOwnProperty.call(message, "ocspSigning")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ocspSigning); + return writer; + }; + + /** + * Encodes the specified ExtendedKeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.IExtendedKeyUsageOptions} message ExtendedKeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedKeyUsageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedKeyUsageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serverAuth = reader.bool(); + break; + case 2: + message.clientAuth = reader.bool(); + break; + case 3: + message.codeSigning = reader.bool(); + break; + case 4: + message.emailProtection = reader.bool(); + break; + case 5: + message.timeStamping = reader.bool(); + break; + case 6: + message.ocspSigning = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedKeyUsageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtendedKeyUsageOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtendedKeyUsageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serverAuth != null && message.hasOwnProperty("serverAuth")) + if (typeof message.serverAuth !== "boolean") + return "serverAuth: boolean expected"; + if (message.clientAuth != null && message.hasOwnProperty("clientAuth")) + if (typeof message.clientAuth !== "boolean") + return "clientAuth: boolean expected"; + if (message.codeSigning != null && message.hasOwnProperty("codeSigning")) + if (typeof message.codeSigning !== "boolean") + return "codeSigning: boolean expected"; + if (message.emailProtection != null && message.hasOwnProperty("emailProtection")) + if (typeof message.emailProtection !== "boolean") + return "emailProtection: boolean expected"; + if (message.timeStamping != null && message.hasOwnProperty("timeStamping")) + if (typeof message.timeStamping !== "boolean") + return "timeStamping: boolean expected"; + if (message.ocspSigning != null && message.hasOwnProperty("ocspSigning")) + if (typeof message.ocspSigning !== "boolean") + return "ocspSigning: boolean expected"; + return null; + }; + + /** + * Creates an ExtendedKeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions + */ + ExtendedKeyUsageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions(); + if (object.serverAuth != null) + message.serverAuth = Boolean(object.serverAuth); + if (object.clientAuth != null) + message.clientAuth = Boolean(object.clientAuth); + if (object.codeSigning != null) + message.codeSigning = Boolean(object.codeSigning); + if (object.emailProtection != null) + message.emailProtection = Boolean(object.emailProtection); + if (object.timeStamping != null) + message.timeStamping = Boolean(object.timeStamping); + if (object.ocspSigning != null) + message.ocspSigning = Boolean(object.ocspSigning); + return message; + }; + + /** + * Creates a plain object from an ExtendedKeyUsageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions} message ExtendedKeyUsageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtendedKeyUsageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serverAuth = false; + object.clientAuth = false; + object.codeSigning = false; + object.emailProtection = false; + object.timeStamping = false; + object.ocspSigning = false; + } + if (message.serverAuth != null && message.hasOwnProperty("serverAuth")) + object.serverAuth = message.serverAuth; + if (message.clientAuth != null && message.hasOwnProperty("clientAuth")) + object.clientAuth = message.clientAuth; + if (message.codeSigning != null && message.hasOwnProperty("codeSigning")) + object.codeSigning = message.codeSigning; + if (message.emailProtection != null && message.hasOwnProperty("emailProtection")) + object.emailProtection = message.emailProtection; + if (message.timeStamping != null && message.hasOwnProperty("timeStamping")) + object.timeStamping = message.timeStamping; + if (message.ocspSigning != null && message.hasOwnProperty("ocspSigning")) + object.ocspSigning = message.ocspSigning; + return object; + }; + + /** + * Converts this ExtendedKeyUsageOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @instance + * @returns {Object.} JSON object + */ + ExtendedKeyUsageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtendedKeyUsageOptions; + })(); + + return KeyUsage; + })(); + + v1beta1.Subject = (function() { + + /** + * Properties of a Subject. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ISubject + * @property {string|null} [countryCode] Subject countryCode + * @property {string|null} [organization] Subject organization + * @property {string|null} [organizationalUnit] Subject organizationalUnit + * @property {string|null} [locality] Subject locality + * @property {string|null} [province] Subject province + * @property {string|null} [streetAddress] Subject streetAddress + * @property {string|null} [postalCode] Subject postalCode + */ + + /** + * Constructs a new Subject. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a Subject. + * @implements ISubject + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ISubject=} [properties] Properties to set + */ + function Subject(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Subject countryCode. + * @member {string} countryCode + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.countryCode = ""; + + /** + * Subject organization. + * @member {string} organization + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.organization = ""; + + /** + * Subject organizationalUnit. + * @member {string} organizationalUnit + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.organizationalUnit = ""; + + /** + * Subject locality. + * @member {string} locality + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.locality = ""; + + /** + * Subject province. + * @member {string} province + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.province = ""; + + /** + * Subject streetAddress. + * @member {string} streetAddress + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.streetAddress = ""; + + /** + * Subject postalCode. + * @member {string} postalCode + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + */ + Subject.prototype.postalCode = ""; + + /** + * Creates a new Subject instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubject=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.Subject} Subject instance + */ + Subject.create = function create(properties) { + return new Subject(properties); + }; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Subject.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.countryCode); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.organization); + if (message.organizationalUnit != null && Object.hasOwnProperty.call(message, "organizationalUnit")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.organizationalUnit); + if (message.locality != null && Object.hasOwnProperty.call(message, "locality")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locality); + if (message.province != null && Object.hasOwnProperty.call(message, "province")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.province); + if (message.streetAddress != null && Object.hasOwnProperty.call(message, "streetAddress")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.streetAddress); + if (message.postalCode != null && Object.hasOwnProperty.call(message, "postalCode")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.postalCode); + return writer; + }; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.Subject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.Subject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.countryCode = reader.string(); + break; + case 2: + message.organization = reader.string(); + break; + case 3: + message.organizationalUnit = reader.string(); + break; + case 4: + message.locality = reader.string(); + break; + case 5: + message.province = reader.string(); + break; + case 6: + message.streetAddress = reader.string(); + break; + case 7: + message.postalCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Subject message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Subject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.countryCode != null && message.hasOwnProperty("countryCode")) + if (!$util.isString(message.countryCode)) + return "countryCode: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + if (!$util.isString(message.organization)) + return "organization: string expected"; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + if (!$util.isString(message.organizationalUnit)) + return "organizationalUnit: string expected"; + if (message.locality != null && message.hasOwnProperty("locality")) + if (!$util.isString(message.locality)) + return "locality: string expected"; + if (message.province != null && message.hasOwnProperty("province")) + if (!$util.isString(message.province)) + return "province: string expected"; + if (message.streetAddress != null && message.hasOwnProperty("streetAddress")) + if (!$util.isString(message.streetAddress)) + return "streetAddress: string expected"; + if (message.postalCode != null && message.hasOwnProperty("postalCode")) + if (!$util.isString(message.postalCode)) + return "postalCode: string expected"; + return null; + }; + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.Subject} Subject + */ + Subject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.Subject) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.Subject(); + if (object.countryCode != null) + message.countryCode = String(object.countryCode); + if (object.organization != null) + message.organization = String(object.organization); + if (object.organizationalUnit != null) + message.organizationalUnit = String(object.organizationalUnit); + if (object.locality != null) + message.locality = String(object.locality); + if (object.province != null) + message.province = String(object.province); + if (object.streetAddress != null) + message.streetAddress = String(object.streetAddress); + if (object.postalCode != null) + message.postalCode = String(object.postalCode); + return message; + }; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {google.cloud.security.privateca.v1beta1.Subject} message Subject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Subject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.countryCode = ""; + object.organization = ""; + object.organizationalUnit = ""; + object.locality = ""; + object.province = ""; + object.streetAddress = ""; + object.postalCode = ""; + } + if (message.countryCode != null && message.hasOwnProperty("countryCode")) + object.countryCode = message.countryCode; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = message.organization; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + object.organizationalUnit = message.organizationalUnit; + if (message.locality != null && message.hasOwnProperty("locality")) + object.locality = message.locality; + if (message.province != null && message.hasOwnProperty("province")) + object.province = message.province; + if (message.streetAddress != null && message.hasOwnProperty("streetAddress")) + object.streetAddress = message.streetAddress; + if (message.postalCode != null && message.hasOwnProperty("postalCode")) + object.postalCode = message.postalCode; + return object; + }; + + /** + * Converts this Subject to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @instance + * @returns {Object.} JSON object + */ + Subject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Subject; + })(); + + v1beta1.SubjectAltNames = (function() { + + /** + * Properties of a SubjectAltNames. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ISubjectAltNames + * @property {Array.|null} [dnsNames] SubjectAltNames dnsNames + * @property {Array.|null} [uris] SubjectAltNames uris + * @property {Array.|null} [emailAddresses] SubjectAltNames emailAddresses + * @property {Array.|null} [ipAddresses] SubjectAltNames ipAddresses + * @property {Array.|null} [customSans] SubjectAltNames customSans + */ + + /** + * Constructs a new SubjectAltNames. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a SubjectAltNames. + * @implements ISubjectAltNames + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ISubjectAltNames=} [properties] Properties to set + */ + function SubjectAltNames(properties) { + this.dnsNames = []; + this.uris = []; + this.emailAddresses = []; + this.ipAddresses = []; + this.customSans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubjectAltNames dnsNames. + * @member {Array.} dnsNames + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.dnsNames = $util.emptyArray; + + /** + * SubjectAltNames uris. + * @member {Array.} uris + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.uris = $util.emptyArray; + + /** + * SubjectAltNames emailAddresses. + * @member {Array.} emailAddresses + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.emailAddresses = $util.emptyArray; + + /** + * SubjectAltNames ipAddresses. + * @member {Array.} ipAddresses + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.ipAddresses = $util.emptyArray; + + /** + * SubjectAltNames customSans. + * @member {Array.} customSans + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.customSans = $util.emptyArray; + + /** + * Creates a new SubjectAltNames instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubjectAltNames=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.SubjectAltNames} SubjectAltNames instance + */ + SubjectAltNames.create = function create(properties) { + return new SubjectAltNames(properties); + }; + + /** + * Encodes the specified SubjectAltNames message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubjectAltNames.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubjectAltNames} message SubjectAltNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectAltNames.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dnsNames != null && message.dnsNames.length) + for (var i = 0; i < message.dnsNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dnsNames[i]); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uris[i]); + if (message.emailAddresses != null && message.emailAddresses.length) + for (var i = 0; i < message.emailAddresses.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.emailAddresses[i]); + if (message.ipAddresses != null && message.ipAddresses.length) + for (var i = 0; i < message.ipAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddresses[i]); + if (message.customSans != null && message.customSans.length) + for (var i = 0; i < message.customSans.length; ++i) + $root.google.cloud.security.privateca.v1beta1.X509Extension.encode(message.customSans[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubjectAltNames message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.SubjectAltNames.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.ISubjectAltNames} message SubjectAltNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectAltNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.SubjectAltNames} SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectAltNames.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.SubjectAltNames(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dnsNames && message.dnsNames.length)) + message.dnsNames = []; + message.dnsNames.push(reader.string()); + break; + case 2: + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + case 3: + if (!(message.emailAddresses && message.emailAddresses.length)) + message.emailAddresses = []; + message.emailAddresses.push(reader.string()); + break; + case 4: + if (!(message.ipAddresses && message.ipAddresses.length)) + message.ipAddresses = []; + message.ipAddresses.push(reader.string()); + break; + case 5: + if (!(message.customSans && message.customSans.length)) + message.customSans = []; + message.customSans.push($root.google.cloud.security.privateca.v1beta1.X509Extension.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.SubjectAltNames} SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectAltNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubjectAltNames message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubjectAltNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dnsNames != null && message.hasOwnProperty("dnsNames")) { + if (!Array.isArray(message.dnsNames)) + return "dnsNames: array expected"; + for (var i = 0; i < message.dnsNames.length; ++i) + if (!$util.isString(message.dnsNames[i])) + return "dnsNames: string[] expected"; + } + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + if (message.emailAddresses != null && message.hasOwnProperty("emailAddresses")) { + if (!Array.isArray(message.emailAddresses)) + return "emailAddresses: array expected"; + for (var i = 0; i < message.emailAddresses.length; ++i) + if (!$util.isString(message.emailAddresses[i])) + return "emailAddresses: string[] expected"; + } + if (message.ipAddresses != null && message.hasOwnProperty("ipAddresses")) { + if (!Array.isArray(message.ipAddresses)) + return "ipAddresses: array expected"; + for (var i = 0; i < message.ipAddresses.length; ++i) + if (!$util.isString(message.ipAddresses[i])) + return "ipAddresses: string[] expected"; + } + if (message.customSans != null && message.hasOwnProperty("customSans")) { + if (!Array.isArray(message.customSans)) + return "customSans: array expected"; + for (var i = 0; i < message.customSans.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.X509Extension.verify(message.customSans[i]); + if (error) + return "customSans." + error; + } + } + return null; + }; + + /** + * Creates a SubjectAltNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.SubjectAltNames} SubjectAltNames + */ + SubjectAltNames.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.SubjectAltNames) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.SubjectAltNames(); + if (object.dnsNames) { + if (!Array.isArray(object.dnsNames)) + throw TypeError(".google.cloud.security.privateca.v1beta1.SubjectAltNames.dnsNames: array expected"); + message.dnsNames = []; + for (var i = 0; i < object.dnsNames.length; ++i) + message.dnsNames[i] = String(object.dnsNames[i]); + } + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.cloud.security.privateca.v1beta1.SubjectAltNames.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + if (object.emailAddresses) { + if (!Array.isArray(object.emailAddresses)) + throw TypeError(".google.cloud.security.privateca.v1beta1.SubjectAltNames.emailAddresses: array expected"); + message.emailAddresses = []; + for (var i = 0; i < object.emailAddresses.length; ++i) + message.emailAddresses[i] = String(object.emailAddresses[i]); + } + if (object.ipAddresses) { + if (!Array.isArray(object.ipAddresses)) + throw TypeError(".google.cloud.security.privateca.v1beta1.SubjectAltNames.ipAddresses: array expected"); + message.ipAddresses = []; + for (var i = 0; i < object.ipAddresses.length; ++i) + message.ipAddresses[i] = String(object.ipAddresses[i]); + } + if (object.customSans) { + if (!Array.isArray(object.customSans)) + throw TypeError(".google.cloud.security.privateca.v1beta1.SubjectAltNames.customSans: array expected"); + message.customSans = []; + for (var i = 0; i < object.customSans.length; ++i) { + if (typeof object.customSans[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.SubjectAltNames.customSans: object expected"); + message.customSans[i] = $root.google.cloud.security.privateca.v1beta1.X509Extension.fromObject(object.customSans[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SubjectAltNames message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1beta1.SubjectAltNames} message SubjectAltNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubjectAltNames.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dnsNames = []; + object.uris = []; + object.emailAddresses = []; + object.ipAddresses = []; + object.customSans = []; + } + if (message.dnsNames && message.dnsNames.length) { + object.dnsNames = []; + for (var j = 0; j < message.dnsNames.length; ++j) + object.dnsNames[j] = message.dnsNames[j]; + } + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + if (message.emailAddresses && message.emailAddresses.length) { + object.emailAddresses = []; + for (var j = 0; j < message.emailAddresses.length; ++j) + object.emailAddresses[j] = message.emailAddresses[j]; + } + if (message.ipAddresses && message.ipAddresses.length) { + object.ipAddresses = []; + for (var j = 0; j < message.ipAddresses.length; ++j) + object.ipAddresses[j] = message.ipAddresses[j]; + } + if (message.customSans && message.customSans.length) { + object.customSans = []; + for (var j = 0; j < message.customSans.length; ++j) + object.customSans[j] = $root.google.cloud.security.privateca.v1beta1.X509Extension.toObject(message.customSans[j], options); + } + return object; + }; + + /** + * Converts this SubjectAltNames to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @instance + * @returns {Object.} JSON object + */ + SubjectAltNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubjectAltNames; + })(); + + /** + * RevocationReason enum. + * @name google.cloud.security.privateca.v1beta1.RevocationReason + * @enum {number} + * @property {number} REVOCATION_REASON_UNSPECIFIED=0 REVOCATION_REASON_UNSPECIFIED value + * @property {number} KEY_COMPROMISE=1 KEY_COMPROMISE value + * @property {number} CERTIFICATE_AUTHORITY_COMPROMISE=2 CERTIFICATE_AUTHORITY_COMPROMISE value + * @property {number} AFFILIATION_CHANGED=3 AFFILIATION_CHANGED value + * @property {number} SUPERSEDED=4 SUPERSEDED value + * @property {number} CESSATION_OF_OPERATION=5 CESSATION_OF_OPERATION value + * @property {number} CERTIFICATE_HOLD=6 CERTIFICATE_HOLD value + * @property {number} PRIVILEGE_WITHDRAWN=7 PRIVILEGE_WITHDRAWN value + * @property {number} ATTRIBUTE_AUTHORITY_COMPROMISE=8 ATTRIBUTE_AUTHORITY_COMPROMISE value + */ + v1beta1.RevocationReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REVOCATION_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEY_COMPROMISE"] = 1; + values[valuesById[2] = "CERTIFICATE_AUTHORITY_COMPROMISE"] = 2; + values[valuesById[3] = "AFFILIATION_CHANGED"] = 3; + values[valuesById[4] = "SUPERSEDED"] = 4; + values[valuesById[5] = "CESSATION_OF_OPERATION"] = 5; + values[valuesById[6] = "CERTIFICATE_HOLD"] = 6; + values[valuesById[7] = "PRIVILEGE_WITHDRAWN"] = 7; + values[valuesById[8] = "ATTRIBUTE_AUTHORITY_COMPROMISE"] = 8; + return values; + })(); + + v1beta1.CertificateAuthorityService = (function() { + + /** + * Constructs a new CertificateAuthorityService service. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CertificateAuthorityService + * @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 CertificateAuthorityService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CertificateAuthorityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CertificateAuthorityService; + + /** + * Creates new CertificateAuthorityService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @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 {CertificateAuthorityService} RPC service. Useful where requests and/or responses are streamed. + */ + CertificateAuthorityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificate}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef CreateCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.Certificate} [response] Certificate + */ + + /** + * Calls CreateCertificate. + * @function createCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRequest} request CreateCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCertificate = function createCertificate(request, callback) { + return this.rpcCall(createCertificate, $root.google.cloud.security.privateca.v1beta1.CreateCertificateRequest, $root.google.cloud.security.privateca.v1beta1.Certificate, request, callback); + }, "name", { value: "CreateCertificate" }); + + /** + * Calls CreateCertificate. + * @function createCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRequest} request CreateCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificate}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef GetCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.Certificate} [response] Certificate + */ + + /** + * Calls GetCertificate. + * @function getCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRequest} request GetCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificate = function getCertificate(request, callback) { + return this.rpcCall(getCertificate, $root.google.cloud.security.privateca.v1beta1.GetCertificateRequest, $root.google.cloud.security.privateca.v1beta1.Certificate, request, callback); + }, "name", { value: "GetCertificate" }); + + /** + * Calls GetCertificate. + * @function getCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRequest} request GetCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificates}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef ListCertificatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.ListCertificatesResponse} [response] ListCertificatesResponse + */ + + /** + * Calls ListCertificates. + * @function listCertificates + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesRequest} request ListCertificatesRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificatesCallback} callback Node-style callback called with the error, if any, and ListCertificatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificates = function listCertificates(request, callback) { + return this.rpcCall(listCertificates, $root.google.cloud.security.privateca.v1beta1.ListCertificatesRequest, $root.google.cloud.security.privateca.v1beta1.ListCertificatesResponse, request, callback); + }, "name", { value: "ListCertificates" }); + + /** + * Calls ListCertificates. + * @function listCertificates + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesRequest} request ListCertificatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#revokeCertificate}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef RevokeCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.Certificate} [response] Certificate + */ + + /** + * Calls RevokeCertificate. + * @function revokeCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest} request RevokeCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.revokeCertificate = function revokeCertificate(request, callback) { + return this.rpcCall(revokeCertificate, $root.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest, $root.google.cloud.security.privateca.v1beta1.Certificate, request, callback); + }, "name", { value: "RevokeCertificate" }); + + /** + * Calls RevokeCertificate. + * @function revokeCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest} request RevokeCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificate}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef UpdateCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.Certificate} [response] Certificate + */ + + /** + * Calls UpdateCertificate. + * @function updateCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest} request UpdateCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificate = function updateCertificate(request, callback) { + return this.rpcCall(updateCertificate, $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest, $root.google.cloud.security.privateca.v1beta1.Certificate, request, callback); + }, "name", { value: "UpdateCertificate" }); + + /** + * Calls UpdateCertificate. + * @function updateCertificate + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest} request UpdateCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#activateCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef ActivateCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ActivateCertificateAuthority. + * @function activateCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest} request ActivateCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.activateCertificateAuthority = function activateCertificateAuthority(request, callback) { + return this.rpcCall(activateCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ActivateCertificateAuthority" }); + + /** + * Calls ActivateCertificateAuthority. + * @function activateCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest} request ActivateCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef CreateCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCertificateAuthority. + * @function createCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest} request CreateCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCertificateAuthority = function createCertificateAuthority(request, callback) { + return this.rpcCall(createCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCertificateAuthority" }); + + /** + * Calls CreateCertificateAuthority. + * @function createCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest} request CreateCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#disableCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef DisableCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DisableCertificateAuthority. + * @function disableCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest} request DisableCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.disableCertificateAuthority = function disableCertificateAuthority(request, callback) { + return this.rpcCall(disableCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DisableCertificateAuthority" }); + + /** + * Calls DisableCertificateAuthority. + * @function disableCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest} request DisableCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#enableCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef EnableCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EnableCertificateAuthority. + * @function enableCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest} request EnableCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.enableCertificateAuthority = function enableCertificateAuthority(request, callback) { + return this.rpcCall(enableCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EnableCertificateAuthority" }); + + /** + * Calls EnableCertificateAuthority. + * @function enableCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest} request EnableCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef FetchCertificateAuthorityCsrCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} [response] FetchCertificateAuthorityCsrResponse + */ + + /** + * Calls FetchCertificateAuthorityCsr. + * @function fetchCertificateAuthorityCsr + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest} request FetchCertificateAuthorityCsrRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsrCallback} callback Node-style callback called with the error, if any, and FetchCertificateAuthorityCsrResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.fetchCertificateAuthorityCsr = function fetchCertificateAuthorityCsr(request, callback) { + return this.rpcCall(fetchCertificateAuthorityCsr, $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest, $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse, request, callback); + }, "name", { value: "FetchCertificateAuthorityCsr" }); + + /** + * Calls FetchCertificateAuthorityCsr. + * @function fetchCertificateAuthorityCsr + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest} request FetchCertificateAuthorityCsrRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef GetCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} [response] CertificateAuthority + */ + + /** + * Calls GetCertificateAuthority. + * @function getCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest} request GetCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and CertificateAuthority + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificateAuthority = function getCertificateAuthority(request, callback) { + return this.rpcCall(getCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest, $root.google.cloud.security.privateca.v1beta1.CertificateAuthority, request, callback); + }, "name", { value: "GetCertificateAuthority" }); + + /** + * Calls GetCertificateAuthority. + * @function getCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest} request GetCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateAuthorities}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef ListCertificateAuthoritiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} [response] ListCertificateAuthoritiesResponse + */ + + /** + * Calls ListCertificateAuthorities. + * @function listCertificateAuthorities + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest} request ListCertificateAuthoritiesRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthoritiesCallback} callback Node-style callback called with the error, if any, and ListCertificateAuthoritiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificateAuthorities = function listCertificateAuthorities(request, callback) { + return this.rpcCall(listCertificateAuthorities, $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest, $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse, request, callback); + }, "name", { value: "ListCertificateAuthorities" }); + + /** + * Calls ListCertificateAuthorities. + * @function listCertificateAuthorities + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest} request ListCertificateAuthoritiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#restoreCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef RestoreCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestoreCertificateAuthority. + * @function restoreCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest} request RestoreCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.restoreCertificateAuthority = function restoreCertificateAuthority(request, callback) { + return this.rpcCall(restoreCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestoreCertificateAuthority" }); + + /** + * Calls RestoreCertificateAuthority. + * @function restoreCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest} request RestoreCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#scheduleDeleteCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef ScheduleDeleteCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ScheduleDeleteCertificateAuthority. + * @function scheduleDeleteCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest} request ScheduleDeleteCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.scheduleDeleteCertificateAuthority = function scheduleDeleteCertificateAuthority(request, callback) { + return this.rpcCall(scheduleDeleteCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ScheduleDeleteCertificateAuthority" }); + + /** + * Calls ScheduleDeleteCertificateAuthority. + * @function scheduleDeleteCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest} request ScheduleDeleteCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef UpdateCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCertificateAuthority. + * @function updateCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest} request UpdateCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificateAuthority = function updateCertificateAuthority(request, callback) { + return this.rpcCall(updateCertificateAuthority, $root.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCertificateAuthority" }); + + /** + * Calls UpdateCertificateAuthority. + * @function updateCertificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest} request UpdateCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateRevocationList}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef CreateCertificateRevocationListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCertificateRevocationList. + * @function createCertificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} request CreateCertificateRevocationListRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationListCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCertificateRevocationList = function createCertificateRevocationList(request, callback) { + return this.rpcCall(createCertificateRevocationList, $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCertificateRevocationList" }); + + /** + * Calls CreateCertificateRevocationList. + * @function createCertificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} request CreateCertificateRevocationListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateRevocationList}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef GetCertificateRevocationListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList} [response] CertificateRevocationList + */ + + /** + * Calls GetCertificateRevocationList. + * @function getCertificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} request GetCertificateRevocationListRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationListCallback} callback Node-style callback called with the error, if any, and CertificateRevocationList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificateRevocationList = function getCertificateRevocationList(request, callback) { + return this.rpcCall(getCertificateRevocationList, $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest, $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList, request, callback); + }, "name", { value: "GetCertificateRevocationList" }); + + /** + * Calls GetCertificateRevocationList. + * @function getCertificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} request GetCertificateRevocationListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateRevocationLists}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef ListCertificateRevocationListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} [response] ListCertificateRevocationListsResponse + */ + + /** + * Calls ListCertificateRevocationLists. + * @function listCertificateRevocationLists + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest} request ListCertificateRevocationListsRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationListsCallback} callback Node-style callback called with the error, if any, and ListCertificateRevocationListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificateRevocationLists = function listCertificateRevocationLists(request, callback) { + return this.rpcCall(listCertificateRevocationLists, $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest, $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse, request, callback); + }, "name", { value: "ListCertificateRevocationLists" }); + + /** + * Calls ListCertificateRevocationLists. + * @function listCertificateRevocationLists + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest} request ListCertificateRevocationListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateRevocationList}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef UpdateCertificateRevocationListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCertificateRevocationList. + * @function updateCertificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} request UpdateCertificateRevocationListRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationListCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificateRevocationList = function updateCertificateRevocationList(request, callback) { + return this.rpcCall(updateCertificateRevocationList, $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCertificateRevocationList" }); + + /** + * Calls UpdateCertificateRevocationList. + * @function updateCertificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} request UpdateCertificateRevocationListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createReusableConfig}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef CreateReusableConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateReusableConfig. + * @function createReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} request CreateReusableConfigRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createReusableConfig = function createReusableConfig(request, callback) { + return this.rpcCall(createReusableConfig, $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateReusableConfig" }); + + /** + * Calls CreateReusableConfig. + * @function createReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} request CreateReusableConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#deleteReusableConfig}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef DeleteReusableConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteReusableConfig. + * @function deleteReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} request DeleteReusableConfigRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.deleteReusableConfig = function deleteReusableConfig(request, callback) { + return this.rpcCall(deleteReusableConfig, $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteReusableConfig" }); + + /** + * Calls DeleteReusableConfig. + * @function deleteReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} request DeleteReusableConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getReusableConfig}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef GetReusableConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.ReusableConfig} [response] ReusableConfig + */ + + /** + * Calls GetReusableConfig. + * @function getReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest} request GetReusableConfigRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfigCallback} callback Node-style callback called with the error, if any, and ReusableConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getReusableConfig = function getReusableConfig(request, callback) { + return this.rpcCall(getReusableConfig, $root.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest, $root.google.cloud.security.privateca.v1beta1.ReusableConfig, request, callback); + }, "name", { value: "GetReusableConfig" }); + + /** + * Calls GetReusableConfig. + * @function getReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest} request GetReusableConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listReusableConfigs}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef ListReusableConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} [response] ListReusableConfigsResponse + */ + + /** + * Calls ListReusableConfigs. + * @function listReusableConfigs + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest} request ListReusableConfigsRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigsCallback} callback Node-style callback called with the error, if any, and ListReusableConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listReusableConfigs = function listReusableConfigs(request, callback) { + return this.rpcCall(listReusableConfigs, $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest, $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse, request, callback); + }, "name", { value: "ListReusableConfigs" }); + + /** + * Calls ListReusableConfigs. + * @function listReusableConfigs + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest} request ListReusableConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateReusableConfig}. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @typedef UpdateReusableConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateReusableConfig. + * @function updateReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} request UpdateReusableConfigRequest message or plain object + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfigCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateReusableConfig = function updateReusableConfig(request, callback) { + return this.rpcCall(updateReusableConfig, $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateReusableConfig" }); + + /** + * Calls UpdateReusableConfig. + * @function updateReusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} request UpdateReusableConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CertificateAuthorityService; + })(); + + v1beta1.CreateCertificateRequest = (function() { + + /** + * Properties of a CreateCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICreateCertificateRequest + * @property {string|null} [parent] CreateCertificateRequest parent + * @property {string|null} [certificateId] CreateCertificateRequest certificateId + * @property {google.cloud.security.privateca.v1beta1.ICertificate|null} [certificate] CreateCertificateRequest certificate + * @property {string|null} [requestId] CreateCertificateRequest requestId + */ + + /** + * Constructs a new CreateCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CreateCertificateRequest. + * @implements ICreateCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRequest=} [properties] Properties to set + */ + function CreateCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCertificateRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.parent = ""; + + /** + * CreateCertificateRequest certificateId. + * @member {string} certificateId + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.certificateId = ""; + + /** + * CreateCertificateRequest certificate. + * @member {google.cloud.security.privateca.v1beta1.ICertificate|null|undefined} certificate + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.certificate = null; + + /** + * CreateCertificateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.requestId = ""; + + /** + * Creates a new CreateCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRequest} CreateCertificateRequest instance + */ + CreateCertificateRequest.create = function create(properties) { + return new CreateCertificateRequest(properties); + }; + + /** + * Encodes the specified CreateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRequest} message CreateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateRequest.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.certificateId != null && Object.hasOwnProperty.call(message, "certificateId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateId); + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) + $root.google.cloud.security.privateca.v1beta1.Certificate.encode(message.certificate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRequest} message CreateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRequest} CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.certificateId = reader.string(); + break; + case 3: + message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRequest} CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCertificateRequest.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.certificateId != null && message.hasOwnProperty("certificateId")) + if (!$util.isString(message.certificateId)) + return "certificateId: string expected"; + if (message.certificate != null && message.hasOwnProperty("certificate")) { + var error = $root.google.cloud.security.privateca.v1beta1.Certificate.verify(message.certificate); + if (error) + return "certificate." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRequest} CreateCertificateRequest + */ + CreateCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CreateCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.certificateId != null) + message.certificateId = String(object.certificateId); + if (object.certificate != null) { + if (typeof object.certificate !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CreateCertificateRequest.certificate: object expected"); + message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.fromObject(object.certificate); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.CreateCertificateRequest} message CreateCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCertificateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.certificateId = ""; + object.certificate = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.certificateId != null && message.hasOwnProperty("certificateId")) + object.certificateId = message.certificateId; + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.toObject(message.certificate, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCertificateRequest; + })(); + + v1beta1.GetCertificateRequest = (function() { + + /** + * Properties of a GetCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IGetCertificateRequest + * @property {string|null} [name] GetCertificateRequest name + */ + + /** + * Constructs a new GetCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a GetCertificateRequest. + * @implements IGetCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRequest=} [properties] Properties to set + */ + function GetCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @instance + */ + GetCertificateRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRequest} GetCertificateRequest instance + */ + GetCertificateRequest.create = function create(properties) { + return new GetCertificateRequest(properties); + }; + + /** + * Encodes the specified GetCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRequest} message GetCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRequest.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 GetCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRequest} message GetCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRequest} GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRequest(); + 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 GetCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRequest} GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateRequest.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 GetCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRequest} GetCertificateRequest + */ + GetCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.GetCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.GetCertificateRequest} message GetCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateRequest.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 GetCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateRequest; + })(); + + v1beta1.ListCertificatesRequest = (function() { + + /** + * Properties of a ListCertificatesRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListCertificatesRequest + * @property {string|null} [parent] ListCertificatesRequest parent + * @property {number|null} [pageSize] ListCertificatesRequest pageSize + * @property {string|null} [pageToken] ListCertificatesRequest pageToken + * @property {string|null} [filter] ListCertificatesRequest filter + * @property {string|null} [orderBy] ListCertificatesRequest orderBy + */ + + /** + * Constructs a new ListCertificatesRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListCertificatesRequest. + * @implements IListCertificatesRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesRequest=} [properties] Properties to set + */ + function ListCertificatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificatesRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.parent = ""; + + /** + * ListCertificatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.pageSize = 0; + + /** + * ListCertificatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.pageToken = ""; + + /** + * ListCertificatesRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.filter = ""; + + /** + * ListCertificatesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesRequest} ListCertificatesRequest instance + */ + ListCertificatesRequest.create = function create(properties) { + return new ListCertificatesRequest(properties); + }; + + /** + * Encodes the specified ListCertificatesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesRequest} message ListCertificatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesRequest.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 ListCertificatesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesRequest} message ListCertificatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesRequest} ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListCertificatesRequest(); + 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 ListCertificatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesRequest} ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificatesRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificatesRequest.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 ListCertificatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesRequest} ListCertificatesRequest + */ + ListCertificatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListCertificatesRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListCertificatesRequest(); + 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 ListCertificatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ListCertificatesRequest} message ListCertificatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificatesRequest.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 ListCertificatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificatesRequest; + })(); + + v1beta1.ListCertificatesResponse = (function() { + + /** + * Properties of a ListCertificatesResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListCertificatesResponse + * @property {Array.|null} [certificates] ListCertificatesResponse certificates + * @property {string|null} [nextPageToken] ListCertificatesResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificatesResponse unreachable + */ + + /** + * Constructs a new ListCertificatesResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListCertificatesResponse. + * @implements IListCertificatesResponse + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesResponse=} [properties] Properties to set + */ + function ListCertificatesResponse(properties) { + this.certificates = []; + 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]]; + } + + /** + * ListCertificatesResponse certificates. + * @member {Array.} certificates + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @instance + */ + ListCertificatesResponse.prototype.certificates = $util.emptyArray; + + /** + * ListCertificatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @instance + */ + ListCertificatesResponse.prototype.nextPageToken = ""; + + /** + * ListCertificatesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @instance + */ + ListCertificatesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesResponse} ListCertificatesResponse instance + */ + ListCertificatesResponse.create = function create(properties) { + return new ListCertificatesResponse(properties); + }; + + /** + * Encodes the specified ListCertificatesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesResponse} message ListCertificatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificates != null && message.certificates.length) + for (var i = 0; i < message.certificates.length; ++i) + $root.google.cloud.security.privateca.v1beta1.Certificate.encode(message.certificates[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 ListCertificatesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificatesResponse} message ListCertificatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesResponse} ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListCertificatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificates && message.certificates.length)) + message.certificates = []; + message.certificates.push($root.google.cloud.security.privateca.v1beta1.Certificate.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 ListCertificatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesResponse} ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificatesResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificates != null && message.hasOwnProperty("certificates")) { + if (!Array.isArray(message.certificates)) + return "certificates: array expected"; + for (var i = 0; i < message.certificates.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.Certificate.verify(message.certificates[i]); + if (error) + return "certificates." + 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 ListCertificatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListCertificatesResponse} ListCertificatesResponse + */ + ListCertificatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListCertificatesResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListCertificatesResponse(); + if (object.certificates) { + if (!Array.isArray(object.certificates)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificatesResponse.certificates: array expected"); + message.certificates = []; + for (var i = 0; i < object.certificates.length; ++i) { + if (typeof object.certificates[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificatesResponse.certificates: object expected"); + message.certificates[i] = $root.google.cloud.security.privateca.v1beta1.Certificate.fromObject(object.certificates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificatesResponse.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 ListCertificatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.ListCertificatesResponse} message ListCertificatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificates = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificates && message.certificates.length) { + object.certificates = []; + for (var j = 0; j < message.certificates.length; ++j) + object.certificates[j] = $root.google.cloud.security.privateca.v1beta1.Certificate.toObject(message.certificates[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 ListCertificatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificatesResponse; + })(); + + v1beta1.RevokeCertificateRequest = (function() { + + /** + * Properties of a RevokeCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IRevokeCertificateRequest + * @property {string|null} [name] RevokeCertificateRequest name + * @property {google.cloud.security.privateca.v1beta1.RevocationReason|null} [reason] RevokeCertificateRequest reason + * @property {string|null} [requestId] RevokeCertificateRequest requestId + */ + + /** + * Constructs a new RevokeCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a RevokeCertificateRequest. + * @implements IRevokeCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest=} [properties] Properties to set + */ + function RevokeCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevokeCertificateRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @instance + */ + RevokeCertificateRequest.prototype.name = ""; + + /** + * RevokeCertificateRequest reason. + * @member {google.cloud.security.privateca.v1beta1.RevocationReason} reason + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @instance + */ + RevokeCertificateRequest.prototype.reason = 0; + + /** + * RevokeCertificateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @instance + */ + RevokeCertificateRequest.prototype.requestId = ""; + + /** + * Creates a new RevokeCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} RevokeCertificateRequest instance + */ + RevokeCertificateRequest.create = function create(properties) { + return new RevokeCertificateRequest(properties); + }; + + /** + * Encodes the specified RevokeCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest} message RevokeCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokeCertificateRequest.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.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reason); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RevokeCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RevokeCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest} message RevokeCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokeCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokeCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.reason = reader.int32(); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokeCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevokeCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevokeCertificateRequest.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.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a RevokeCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} RevokeCertificateRequest + */ + RevokeCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.reason) { + case "REVOCATION_REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "KEY_COMPROMISE": + case 1: + message.reason = 1; + break; + case "CERTIFICATE_AUTHORITY_COMPROMISE": + case 2: + message.reason = 2; + break; + case "AFFILIATION_CHANGED": + case 3: + message.reason = 3; + break; + case "SUPERSEDED": + case 4: + message.reason = 4; + break; + case "CESSATION_OF_OPERATION": + case 5: + message.reason = 5; + break; + case "CERTIFICATE_HOLD": + case 6: + message.reason = 6; + break; + case "PRIVILEGE_WITHDRAWN": + case 7: + message.reason = 7; + break; + case "ATTRIBUTE_AUTHORITY_COMPROMISE": + case 8: + message.reason = 8; + break; + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a RevokeCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.RevokeCertificateRequest} message RevokeCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevokeCertificateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.reason = options.enums === String ? "REVOCATION_REASON_UNSPECIFIED" : 0; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.reason] : message.reason; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this RevokeCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + RevokeCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RevokeCertificateRequest; + })(); + + v1beta1.UpdateCertificateRequest = (function() { + + /** + * Properties of an UpdateCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IUpdateCertificateRequest + * @property {google.cloud.security.privateca.v1beta1.ICertificate|null} [certificate] UpdateCertificateRequest certificate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateRequest updateMask + * @property {string|null} [requestId] UpdateCertificateRequest requestId + */ + + /** + * Constructs a new UpdateCertificateRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an UpdateCertificateRequest. + * @implements IUpdateCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest=} [properties] Properties to set + */ + function UpdateCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateRequest certificate. + * @member {google.cloud.security.privateca.v1beta1.ICertificate|null|undefined} certificate + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @instance + */ + UpdateCertificateRequest.prototype.certificate = null; + + /** + * UpdateCertificateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @instance + */ + UpdateCertificateRequest.prototype.updateMask = null; + + /** + * UpdateCertificateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @instance + */ + UpdateCertificateRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} UpdateCertificateRequest instance + */ + UpdateCertificateRequest.create = function create(properties) { + return new UpdateCertificateRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest} message UpdateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) + $root.google.cloud.security.privateca.v1beta1.Certificate.encode(message.certificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest} message UpdateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificate != null && message.hasOwnProperty("certificate")) { + var error = $root.google.cloud.security.privateca.v1beta1.Certificate.verify(message.certificate); + if (error) + return "certificate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} UpdateCertificateRequest + */ + UpdateCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest(); + if (object.certificate != null) { + if (typeof object.certificate !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.certificate: object expected"); + message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.fromObject(object.certificate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.UpdateCertificateRequest} message UpdateCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificate = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.toObject(message.certificate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateRequest; + })(); + + v1beta1.ActivateCertificateAuthorityRequest = (function() { + + /** + * Properties of an ActivateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IActivateCertificateAuthorityRequest + * @property {string|null} [name] ActivateCertificateAuthorityRequest name + * @property {string|null} [pemCaCertificate] ActivateCertificateAuthorityRequest pemCaCertificate + * @property {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null} [subordinateConfig] ActivateCertificateAuthorityRequest subordinateConfig + * @property {string|null} [requestId] ActivateCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new ActivateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an ActivateCertificateAuthorityRequest. + * @implements IActivateCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest=} [properties] Properties to set + */ + function ActivateCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActivateCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.name = ""; + + /** + * ActivateCertificateAuthorityRequest pemCaCertificate. + * @member {string} pemCaCertificate + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.pemCaCertificate = ""; + + /** + * ActivateCertificateAuthorityRequest subordinateConfig. + * @member {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.subordinateConfig = null; + + /** + * ActivateCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new ActivateCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest instance + */ + ActivateCertificateAuthorityRequest.create = function create(properties) { + return new ActivateCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest} message ActivateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateCertificateAuthorityRequest.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.pemCaCertificate != null && Object.hasOwnProperty.call(message, "pemCaCertificate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pemCaCertificate); + if (message.subordinateConfig != null && Object.hasOwnProperty.call(message, "subordinateConfig")) + $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.encode(message.subordinateConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest} message ActivateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pemCaCertificate = reader.string(); + break; + case 3: + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateCertificateAuthorityRequest.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.pemCaCertificate != null && message.hasOwnProperty("pemCaCertificate")) + if (!$util.isString(message.pemCaCertificate)) + return "pemCaCertificate: string expected"; + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.verify(message.subordinateConfig); + if (error) + return "subordinateConfig." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an ActivateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest + */ + ActivateCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pemCaCertificate != null) + message.pemCaCertificate = String(object.pemCaCertificate); + if (object.subordinateConfig != null) { + if (typeof object.subordinateConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest.subordinateConfig: object expected"); + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.fromObject(object.subordinateConfig); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an ActivateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest} message ActivateCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pemCaCertificate = ""; + object.subordinateConfig = null; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pemCaCertificate != null && message.hasOwnProperty("pemCaCertificate")) + object.pemCaCertificate = message.pemCaCertificate; + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) + object.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.toObject(message.subordinateConfig, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this ActivateCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + ActivateCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ActivateCertificateAuthorityRequest; + })(); + + v1beta1.CreateCertificateAuthorityRequest = (function() { + + /** + * Properties of a CreateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICreateCertificateAuthorityRequest + * @property {string|null} [parent] CreateCertificateAuthorityRequest parent + * @property {string|null} [certificateAuthorityId] CreateCertificateAuthorityRequest certificateAuthorityId + * @property {google.cloud.security.privateca.v1beta1.ICertificateAuthority|null} [certificateAuthority] CreateCertificateAuthorityRequest certificateAuthority + * @property {string|null} [requestId] CreateCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new CreateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CreateCertificateAuthorityRequest. + * @implements ICreateCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest=} [properties] Properties to set + */ + function CreateCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCertificateAuthorityRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.parent = ""; + + /** + * CreateCertificateAuthorityRequest certificateAuthorityId. + * @member {string} certificateAuthorityId + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.certificateAuthorityId = ""; + + /** + * CreateCertificateAuthorityRequest certificateAuthority. + * @member {google.cloud.security.privateca.v1beta1.ICertificateAuthority|null|undefined} certificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.certificateAuthority = null; + + /** + * CreateCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new CreateCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest instance + */ + CreateCertificateAuthorityRequest.create = function create(properties) { + return new CreateCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest} message CreateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateAuthorityRequest.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.certificateAuthorityId != null && Object.hasOwnProperty.call(message, "certificateAuthorityId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateAuthorityId); + if (message.certificateAuthority != null && Object.hasOwnProperty.call(message, "certificateAuthority")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.encode(message.certificateAuthority, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest} message CreateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.certificateAuthorityId = reader.string(); + break; + case 3: + message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCertificateAuthorityRequest.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.certificateAuthorityId != null && message.hasOwnProperty("certificateAuthorityId")) + if (!$util.isString(message.certificateAuthorityId)) + return "certificateAuthorityId: string expected"; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.verify(message.certificateAuthority); + if (error) + return "certificateAuthority." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest + */ + CreateCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.certificateAuthorityId != null) + message.certificateAuthorityId = String(object.certificateAuthorityId); + if (object.certificateAuthority != null) { + if (typeof object.certificateAuthority !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest.certificateAuthority: object expected"); + message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.fromObject(object.certificateAuthority); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest} message CreateCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.certificateAuthorityId = ""; + object.certificateAuthority = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.certificateAuthorityId != null && message.hasOwnProperty("certificateAuthorityId")) + object.certificateAuthorityId = message.certificateAuthorityId; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) + object.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.toObject(message.certificateAuthority, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCertificateAuthorityRequest; + })(); + + v1beta1.DisableCertificateAuthorityRequest = (function() { + + /** + * Properties of a DisableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IDisableCertificateAuthorityRequest + * @property {string|null} [name] DisableCertificateAuthorityRequest name + * @property {string|null} [requestId] DisableCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new DisableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a DisableCertificateAuthorityRequest. + * @implements IDisableCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest=} [properties] Properties to set + */ + function DisableCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisableCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @instance + */ + DisableCertificateAuthorityRequest.prototype.name = ""; + + /** + * DisableCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @instance + */ + DisableCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new DisableCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest instance + */ + DisableCertificateAuthorityRequest.create = function create(properties) { + return new DisableCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest} message DisableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest} message DisableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisableCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisableCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DisableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest + */ + DisableCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DisableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest} message DisableCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisableCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DisableCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + DisableCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DisableCertificateAuthorityRequest; + })(); + + v1beta1.EnableCertificateAuthorityRequest = (function() { + + /** + * Properties of an EnableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IEnableCertificateAuthorityRequest + * @property {string|null} [name] EnableCertificateAuthorityRequest name + * @property {string|null} [requestId] EnableCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new EnableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an EnableCertificateAuthorityRequest. + * @implements IEnableCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest=} [properties] Properties to set + */ + function EnableCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnableCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @instance + */ + EnableCertificateAuthorityRequest.prototype.name = ""; + + /** + * EnableCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @instance + */ + EnableCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new EnableCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest instance + */ + EnableCertificateAuthorityRequest.create = function create(properties) { + return new EnableCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest} message EnableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest} message EnableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnableCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnableCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an EnableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest + */ + EnableCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an EnableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest} message EnableCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnableCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this EnableCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + EnableCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnableCertificateAuthorityRequest; + })(); + + v1beta1.FetchCertificateAuthorityCsrRequest = (function() { + + /** + * Properties of a FetchCertificateAuthorityCsrRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IFetchCertificateAuthorityCsrRequest + * @property {string|null} [name] FetchCertificateAuthorityCsrRequest name + */ + + /** + * Constructs a new FetchCertificateAuthorityCsrRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a FetchCertificateAuthorityCsrRequest. + * @implements IFetchCertificateAuthorityCsrRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest=} [properties] Properties to set + */ + function FetchCertificateAuthorityCsrRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchCertificateAuthorityCsrRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @instance + */ + FetchCertificateAuthorityCsrRequest.prototype.name = ""; + + /** + * Creates a new FetchCertificateAuthorityCsrRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest instance + */ + FetchCertificateAuthorityCsrRequest.create = function create(properties) { + return new FetchCertificateAuthorityCsrRequest(properties); + }; + + /** + * Encodes the specified FetchCertificateAuthorityCsrRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest} message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrRequest.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 FetchCertificateAuthorityCsrRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest} message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchCertificateAuthorityCsrRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest(); + 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 FetchCertificateAuthorityCsrRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchCertificateAuthorityCsrRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchCertificateAuthorityCsrRequest.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 FetchCertificateAuthorityCsrRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest + */ + FetchCertificateAuthorityCsrRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest} message FetchCertificateAuthorityCsrRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchCertificateAuthorityCsrRequest.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 FetchCertificateAuthorityCsrRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @instance + * @returns {Object.} JSON object + */ + FetchCertificateAuthorityCsrRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchCertificateAuthorityCsrRequest; + })(); + + v1beta1.FetchCertificateAuthorityCsrResponse = (function() { + + /** + * Properties of a FetchCertificateAuthorityCsrResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IFetchCertificateAuthorityCsrResponse + * @property {string|null} [pemCsr] FetchCertificateAuthorityCsrResponse pemCsr + */ + + /** + * Constructs a new FetchCertificateAuthorityCsrResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a FetchCertificateAuthorityCsrResponse. + * @implements IFetchCertificateAuthorityCsrResponse + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse=} [properties] Properties to set + */ + function FetchCertificateAuthorityCsrResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchCertificateAuthorityCsrResponse pemCsr. + * @member {string} pemCsr + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @instance + */ + FetchCertificateAuthorityCsrResponse.prototype.pemCsr = ""; + + /** + * Creates a new FetchCertificateAuthorityCsrResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse instance + */ + FetchCertificateAuthorityCsrResponse.create = function create(properties) { + return new FetchCertificateAuthorityCsrResponse(properties); + }; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse} message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pemCsr != null && Object.hasOwnProperty.call(message, "pemCsr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pemCsr); + return writer; + }; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse} message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pemCsr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchCertificateAuthorityCsrResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchCertificateAuthorityCsrResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pemCsr != null && message.hasOwnProperty("pemCsr")) + if (!$util.isString(message.pemCsr)) + return "pemCsr: string expected"; + return null; + }; + + /** + * Creates a FetchCertificateAuthorityCsrResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse + */ + FetchCertificateAuthorityCsrResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse(); + if (object.pemCsr != null) + message.pemCsr = String(object.pemCsr); + return message; + }; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse} message FetchCertificateAuthorityCsrResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchCertificateAuthorityCsrResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pemCsr = ""; + if (message.pemCsr != null && message.hasOwnProperty("pemCsr")) + object.pemCsr = message.pemCsr; + return object; + }; + + /** + * Converts this FetchCertificateAuthorityCsrResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @instance + * @returns {Object.} JSON object + */ + FetchCertificateAuthorityCsrResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchCertificateAuthorityCsrResponse; + })(); + + v1beta1.GetCertificateAuthorityRequest = (function() { + + /** + * Properties of a GetCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IGetCertificateAuthorityRequest + * @property {string|null} [name] GetCertificateAuthorityRequest name + */ + + /** + * Constructs a new GetCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a GetCertificateAuthorityRequest. + * @implements IGetCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest=} [properties] Properties to set + */ + function GetCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @instance + */ + GetCertificateAuthorityRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest instance + */ + GetCertificateAuthorityRequest.create = function create(properties) { + return new GetCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified GetCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest} message GetCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateAuthorityRequest.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 GetCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest} message GetCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest(); + 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 GetCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateAuthorityRequest.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 GetCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest + */ + GetCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest} message GetCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateAuthorityRequest.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 GetCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateAuthorityRequest; + })(); + + v1beta1.ListCertificateAuthoritiesRequest = (function() { + + /** + * Properties of a ListCertificateAuthoritiesRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListCertificateAuthoritiesRequest + * @property {string|null} [parent] ListCertificateAuthoritiesRequest parent + * @property {number|null} [pageSize] ListCertificateAuthoritiesRequest pageSize + * @property {string|null} [pageToken] ListCertificateAuthoritiesRequest pageToken + * @property {string|null} [filter] ListCertificateAuthoritiesRequest filter + * @property {string|null} [orderBy] ListCertificateAuthoritiesRequest orderBy + */ + + /** + * Constructs a new ListCertificateAuthoritiesRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListCertificateAuthoritiesRequest. + * @implements IListCertificateAuthoritiesRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest=} [properties] Properties to set + */ + function ListCertificateAuthoritiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificateAuthoritiesRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.parent = ""; + + /** + * ListCertificateAuthoritiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.pageSize = 0; + + /** + * ListCertificateAuthoritiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.pageToken = ""; + + /** + * ListCertificateAuthoritiesRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.filter = ""; + + /** + * ListCertificateAuthoritiesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificateAuthoritiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest instance + */ + ListCertificateAuthoritiesRequest.create = function create(properties) { + return new ListCertificateAuthoritiesRequest(properties); + }; + + /** + * Encodes the specified ListCertificateAuthoritiesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest} message ListCertificateAuthoritiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesRequest.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 ListCertificateAuthoritiesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest} message ListCertificateAuthoritiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateAuthoritiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest(); + 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 ListCertificateAuthoritiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateAuthoritiesRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateAuthoritiesRequest.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 ListCertificateAuthoritiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest + */ + ListCertificateAuthoritiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest(); + 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 ListCertificateAuthoritiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} message ListCertificateAuthoritiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateAuthoritiesRequest.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 ListCertificateAuthoritiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificateAuthoritiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateAuthoritiesRequest; + })(); + + v1beta1.ListCertificateAuthoritiesResponse = (function() { + + /** + * Properties of a ListCertificateAuthoritiesResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListCertificateAuthoritiesResponse + * @property {Array.|null} [certificateAuthorities] ListCertificateAuthoritiesResponse certificateAuthorities + * @property {string|null} [nextPageToken] ListCertificateAuthoritiesResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificateAuthoritiesResponse unreachable + */ + + /** + * Constructs a new ListCertificateAuthoritiesResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListCertificateAuthoritiesResponse. + * @implements IListCertificateAuthoritiesResponse + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse=} [properties] Properties to set + */ + function ListCertificateAuthoritiesResponse(properties) { + this.certificateAuthorities = []; + 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]]; + } + + /** + * ListCertificateAuthoritiesResponse certificateAuthorities. + * @member {Array.} certificateAuthorities + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @instance + */ + ListCertificateAuthoritiesResponse.prototype.certificateAuthorities = $util.emptyArray; + + /** + * ListCertificateAuthoritiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @instance + */ + ListCertificateAuthoritiesResponse.prototype.nextPageToken = ""; + + /** + * ListCertificateAuthoritiesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @instance + */ + ListCertificateAuthoritiesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificateAuthoritiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse instance + */ + ListCertificateAuthoritiesResponse.create = function create(properties) { + return new ListCertificateAuthoritiesResponse(properties); + }; + + /** + * Encodes the specified ListCertificateAuthoritiesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse} message ListCertificateAuthoritiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateAuthorities != null && message.certificateAuthorities.length) + for (var i = 0; i < message.certificateAuthorities.length; ++i) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.encode(message.certificateAuthorities[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 ListCertificateAuthoritiesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse} message ListCertificateAuthoritiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateAuthoritiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificateAuthorities && message.certificateAuthorities.length)) + message.certificateAuthorities = []; + message.certificateAuthorities.push($root.google.cloud.security.privateca.v1beta1.CertificateAuthority.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 ListCertificateAuthoritiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateAuthoritiesResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateAuthoritiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateAuthorities != null && message.hasOwnProperty("certificateAuthorities")) { + if (!Array.isArray(message.certificateAuthorities)) + return "certificateAuthorities: array expected"; + for (var i = 0; i < message.certificateAuthorities.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.verify(message.certificateAuthorities[i]); + if (error) + return "certificateAuthorities." + 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 ListCertificateAuthoritiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse + */ + ListCertificateAuthoritiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse(); + if (object.certificateAuthorities) { + if (!Array.isArray(object.certificateAuthorities)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.certificateAuthorities: array expected"); + message.certificateAuthorities = []; + for (var i = 0; i < object.certificateAuthorities.length; ++i) { + if (typeof object.certificateAuthorities[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.certificateAuthorities: object expected"); + message.certificateAuthorities[i] = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.fromObject(object.certificateAuthorities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.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 ListCertificateAuthoritiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse} message ListCertificateAuthoritiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateAuthoritiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificateAuthorities = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificateAuthorities && message.certificateAuthorities.length) { + object.certificateAuthorities = []; + for (var j = 0; j < message.certificateAuthorities.length; ++j) + object.certificateAuthorities[j] = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.toObject(message.certificateAuthorities[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 ListCertificateAuthoritiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificateAuthoritiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateAuthoritiesResponse; + })(); + + v1beta1.RestoreCertificateAuthorityRequest = (function() { + + /** + * Properties of a RestoreCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IRestoreCertificateAuthorityRequest + * @property {string|null} [name] RestoreCertificateAuthorityRequest name + * @property {string|null} [requestId] RestoreCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new RestoreCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a RestoreCertificateAuthorityRequest. + * @implements IRestoreCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest=} [properties] Properties to set + */ + function RestoreCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestoreCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @instance + */ + RestoreCertificateAuthorityRequest.prototype.name = ""; + + /** + * RestoreCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @instance + */ + RestoreCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new RestoreCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} RestoreCertificateAuthorityRequest instance + */ + RestoreCertificateAuthorityRequest.create = function create(properties) { + return new RestoreCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified RestoreCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest} message RestoreCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RestoreCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest} message RestoreCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestoreCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestoreCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} RestoreCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestoreCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} RestoreCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestoreCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestoreCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestoreCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a RestoreCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} RestoreCertificateAuthorityRequest + */ + RestoreCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a RestoreCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest} message RestoreCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestoreCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this RestoreCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + RestoreCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RestoreCertificateAuthorityRequest; + })(); + + v1beta1.ScheduleDeleteCertificateAuthorityRequest = (function() { + + /** + * Properties of a ScheduleDeleteCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IScheduleDeleteCertificateAuthorityRequest + * @property {string|null} [name] ScheduleDeleteCertificateAuthorityRequest name + * @property {string|null} [requestId] ScheduleDeleteCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new ScheduleDeleteCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ScheduleDeleteCertificateAuthorityRequest. + * @implements IScheduleDeleteCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest=} [properties] Properties to set + */ + function ScheduleDeleteCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScheduleDeleteCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @instance + */ + ScheduleDeleteCertificateAuthorityRequest.prototype.name = ""; + + /** + * ScheduleDeleteCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @instance + */ + ScheduleDeleteCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new ScheduleDeleteCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} ScheduleDeleteCertificateAuthorityRequest instance + */ + ScheduleDeleteCertificateAuthorityRequest.create = function create(properties) { + return new ScheduleDeleteCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified ScheduleDeleteCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest} message ScheduleDeleteCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleDeleteCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified ScheduleDeleteCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest} message ScheduleDeleteCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduleDeleteCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduleDeleteCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} ScheduleDeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleDeleteCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduleDeleteCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} ScheduleDeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduleDeleteCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduleDeleteCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduleDeleteCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a ScheduleDeleteCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} ScheduleDeleteCertificateAuthorityRequest + */ + ScheduleDeleteCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a ScheduleDeleteCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest} message ScheduleDeleteCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduleDeleteCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this ScheduleDeleteCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + ScheduleDeleteCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ScheduleDeleteCertificateAuthorityRequest; + })(); + + v1beta1.UpdateCertificateAuthorityRequest = (function() { + + /** + * Properties of an UpdateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IUpdateCertificateAuthorityRequest + * @property {google.cloud.security.privateca.v1beta1.ICertificateAuthority|null} [certificateAuthority] UpdateCertificateAuthorityRequest certificateAuthority + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateAuthorityRequest updateMask + * @property {string|null} [requestId] UpdateCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new UpdateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an UpdateCertificateAuthorityRequest. + * @implements IUpdateCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest=} [properties] Properties to set + */ + function UpdateCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateAuthorityRequest certificateAuthority. + * @member {google.cloud.security.privateca.v1beta1.ICertificateAuthority|null|undefined} certificateAuthority + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @instance + */ + UpdateCertificateAuthorityRequest.prototype.certificateAuthority = null; + + /** + * UpdateCertificateAuthorityRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @instance + */ + UpdateCertificateAuthorityRequest.prototype.updateMask = null; + + /** + * UpdateCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @instance + */ + UpdateCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest instance + */ + UpdateCertificateAuthorityRequest.create = function create(properties) { + return new UpdateCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest} message UpdateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateAuthorityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateAuthority != null && Object.hasOwnProperty.call(message, "certificateAuthority")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.encode(message.certificateAuthority, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest} message UpdateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateAuthorityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.verify(message.certificateAuthority); + if (error) + return "certificateAuthority." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest + */ + UpdateCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest(); + if (object.certificateAuthority != null) { + if (typeof object.certificateAuthority !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.certificateAuthority: object expected"); + message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.fromObject(object.certificateAuthority); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest} message UpdateCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificateAuthority = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) + object.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.toObject(message.certificateAuthority, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateAuthorityRequest; + })(); + + v1beta1.CreateCertificateRevocationListRequest = (function() { + + /** + * Properties of a CreateCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICreateCertificateRevocationListRequest + * @property {string|null} [parent] CreateCertificateRevocationListRequest parent + * @property {string|null} [certificateRevocationListId] CreateCertificateRevocationListRequest certificateRevocationListId + * @property {google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null} [certificateRevocationList] CreateCertificateRevocationListRequest certificateRevocationList + * @property {string|null} [requestId] CreateCertificateRevocationListRequest requestId + */ + + /** + * Constructs a new CreateCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CreateCertificateRevocationListRequest. + * @implements ICreateCertificateRevocationListRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest=} [properties] Properties to set + */ + function CreateCertificateRevocationListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCertificateRevocationListRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @instance + */ + CreateCertificateRevocationListRequest.prototype.parent = ""; + + /** + * CreateCertificateRevocationListRequest certificateRevocationListId. + * @member {string} certificateRevocationListId + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @instance + */ + CreateCertificateRevocationListRequest.prototype.certificateRevocationListId = ""; + + /** + * CreateCertificateRevocationListRequest certificateRevocationList. + * @member {google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null|undefined} certificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @instance + */ + CreateCertificateRevocationListRequest.prototype.certificateRevocationList = null; + + /** + * CreateCertificateRevocationListRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @instance + */ + CreateCertificateRevocationListRequest.prototype.requestId = ""; + + /** + * Creates a new CreateCertificateRevocationListRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest instance + */ + CreateCertificateRevocationListRequest.create = function create(properties) { + return new CreateCertificateRevocationListRequest(properties); + }; + + /** + * Encodes the specified CreateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} message CreateCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateRevocationListRequest.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.certificateRevocationListId != null && Object.hasOwnProperty.call(message, "certificateRevocationListId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateRevocationListId); + if (message.certificateRevocationList != null && Object.hasOwnProperty.call(message, "certificateRevocationList")) + $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.encode(message.certificateRevocationList, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} message CreateCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateRevocationListRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.certificateRevocationListId = reader.string(); + break; + case 3: + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCertificateRevocationListRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCertificateRevocationListRequest.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.certificateRevocationListId != null && message.hasOwnProperty("certificateRevocationListId")) + if (!$util.isString(message.certificateRevocationListId)) + return "certificateRevocationListId: string expected"; + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify(message.certificateRevocationList); + if (error) + return "certificateRevocationList." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest + */ + CreateCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.certificateRevocationListId != null) + message.certificateRevocationListId = String(object.certificateRevocationListId); + if (object.certificateRevocationList != null) { + if (typeof object.certificateRevocationList !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.certificateRevocationList: object expected"); + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.fromObject(object.certificateRevocationList); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateCertificateRevocationListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} message CreateCertificateRevocationListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCertificateRevocationListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.certificateRevocationListId = ""; + object.certificateRevocationList = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.certificateRevocationListId != null && message.hasOwnProperty("certificateRevocationListId")) + object.certificateRevocationListId = message.certificateRevocationListId; + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) + object.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.toObject(message.certificateRevocationList, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateCertificateRevocationListRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCertificateRevocationListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCertificateRevocationListRequest; + })(); + + v1beta1.GetCertificateRevocationListRequest = (function() { + + /** + * Properties of a GetCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IGetCertificateRevocationListRequest + * @property {string|null} [name] GetCertificateRevocationListRequest name + */ + + /** + * Constructs a new GetCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a GetCertificateRevocationListRequest. + * @implements IGetCertificateRevocationListRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest=} [properties] Properties to set + */ + function GetCertificateRevocationListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateRevocationListRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @instance + */ + GetCertificateRevocationListRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateRevocationListRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest instance + */ + GetCertificateRevocationListRequest.create = function create(properties) { + return new GetCertificateRevocationListRequest(properties); + }; + + /** + * Encodes the specified GetCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRevocationListRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); + 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 GetCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateRevocationListRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest + */ + GetCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateRevocationListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} message GetCertificateRevocationListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateRevocationListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateRevocationListRequest; + })(); + + v1beta1.ListCertificateRevocationListsRequest = (function() { + + /** + * Properties of a ListCertificateRevocationListsRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListCertificateRevocationListsRequest + * @property {string|null} [parent] ListCertificateRevocationListsRequest parent + * @property {number|null} [pageSize] ListCertificateRevocationListsRequest pageSize + * @property {string|null} [pageToken] ListCertificateRevocationListsRequest pageToken + * @property {string|null} [filter] ListCertificateRevocationListsRequest filter + * @property {string|null} [orderBy] ListCertificateRevocationListsRequest orderBy + */ + + /** + * Constructs a new ListCertificateRevocationListsRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListCertificateRevocationListsRequest. + * @implements IListCertificateRevocationListsRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest=} [properties] Properties to set + */ + function ListCertificateRevocationListsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificateRevocationListsRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.parent = ""; + + /** + * ListCertificateRevocationListsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.pageSize = 0; + + /** + * ListCertificateRevocationListsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.pageToken = ""; + + /** + * ListCertificateRevocationListsRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.filter = ""; + + /** + * ListCertificateRevocationListsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificateRevocationListsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest instance + */ + ListCertificateRevocationListsRequest.create = function create(properties) { + return new ListCertificateRevocationListsRequest(properties); + }; + + /** + * Encodes the specified ListCertificateRevocationListsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest} message ListCertificateRevocationListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsRequest.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 ListCertificateRevocationListsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest} message ListCertificateRevocationListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateRevocationListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest(); + 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 ListCertificateRevocationListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateRevocationListsRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateRevocationListsRequest.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 ListCertificateRevocationListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest + */ + ListCertificateRevocationListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest(); + 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 ListCertificateRevocationListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} message ListCertificateRevocationListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateRevocationListsRequest.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 ListCertificateRevocationListsRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificateRevocationListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateRevocationListsRequest; + })(); + + v1beta1.ListCertificateRevocationListsResponse = (function() { + + /** + * Properties of a ListCertificateRevocationListsResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListCertificateRevocationListsResponse + * @property {Array.|null} [certificateRevocationLists] ListCertificateRevocationListsResponse certificateRevocationLists + * @property {string|null} [nextPageToken] ListCertificateRevocationListsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificateRevocationListsResponse unreachable + */ + + /** + * Constructs a new ListCertificateRevocationListsResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListCertificateRevocationListsResponse. + * @implements IListCertificateRevocationListsResponse + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse=} [properties] Properties to set + */ + function ListCertificateRevocationListsResponse(properties) { + this.certificateRevocationLists = []; + 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]]; + } + + /** + * ListCertificateRevocationListsResponse certificateRevocationLists. + * @member {Array.} certificateRevocationLists + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @instance + */ + ListCertificateRevocationListsResponse.prototype.certificateRevocationLists = $util.emptyArray; + + /** + * ListCertificateRevocationListsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @instance + */ + ListCertificateRevocationListsResponse.prototype.nextPageToken = ""; + + /** + * ListCertificateRevocationListsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @instance + */ + ListCertificateRevocationListsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificateRevocationListsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse instance + */ + ListCertificateRevocationListsResponse.create = function create(properties) { + return new ListCertificateRevocationListsResponse(properties); + }; + + /** + * Encodes the specified ListCertificateRevocationListsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse} message ListCertificateRevocationListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateRevocationLists != null && message.certificateRevocationLists.length) + for (var i = 0; i < message.certificateRevocationLists.length; ++i) + $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.encode(message.certificateRevocationLists[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 ListCertificateRevocationListsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse} message ListCertificateRevocationListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateRevocationListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificateRevocationLists && message.certificateRevocationLists.length)) + message.certificateRevocationLists = []; + message.certificateRevocationLists.push($root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.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 ListCertificateRevocationListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateRevocationListsResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateRevocationListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateRevocationLists != null && message.hasOwnProperty("certificateRevocationLists")) { + if (!Array.isArray(message.certificateRevocationLists)) + return "certificateRevocationLists: array expected"; + for (var i = 0; i < message.certificateRevocationLists.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify(message.certificateRevocationLists[i]); + if (error) + return "certificateRevocationLists." + 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 ListCertificateRevocationListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse + */ + ListCertificateRevocationListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse(); + if (object.certificateRevocationLists) { + if (!Array.isArray(object.certificateRevocationLists)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.certificateRevocationLists: array expected"); + message.certificateRevocationLists = []; + for (var i = 0; i < object.certificateRevocationLists.length; ++i) { + if (typeof object.certificateRevocationLists[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.certificateRevocationLists: object expected"); + message.certificateRevocationLists[i] = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.fromObject(object.certificateRevocationLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.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 ListCertificateRevocationListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse} message ListCertificateRevocationListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateRevocationListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificateRevocationLists = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificateRevocationLists && message.certificateRevocationLists.length) { + object.certificateRevocationLists = []; + for (var j = 0; j < message.certificateRevocationLists.length; ++j) + object.certificateRevocationLists[j] = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.toObject(message.certificateRevocationLists[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 ListCertificateRevocationListsResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificateRevocationListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateRevocationListsResponse; + })(); + + v1beta1.UpdateCertificateRevocationListRequest = (function() { + + /** + * Properties of an UpdateCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IUpdateCertificateRevocationListRequest + * @property {google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null} [certificateRevocationList] UpdateCertificateRevocationListRequest certificateRevocationList + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateRevocationListRequest updateMask + * @property {string|null} [requestId] UpdateCertificateRevocationListRequest requestId + */ + + /** + * Constructs a new UpdateCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an UpdateCertificateRevocationListRequest. + * @implements IUpdateCertificateRevocationListRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest=} [properties] Properties to set + */ + function UpdateCertificateRevocationListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateRevocationListRequest certificateRevocationList. + * @member {google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null|undefined} certificateRevocationList + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @instance + */ + UpdateCertificateRevocationListRequest.prototype.certificateRevocationList = null; + + /** + * UpdateCertificateRevocationListRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @instance + */ + UpdateCertificateRevocationListRequest.prototype.updateMask = null; + + /** + * UpdateCertificateRevocationListRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @instance + */ + UpdateCertificateRevocationListRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateRevocationListRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest instance + */ + UpdateCertificateRevocationListRequest.create = function create(properties) { + return new UpdateCertificateRevocationListRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRevocationListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateRevocationList != null && Object.hasOwnProperty.call(message, "certificateRevocationList")) + $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.encode(message.certificateRevocationList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRevocationListRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateRevocationListRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateRevocationListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify(message.certificateRevocationList); + if (error) + return "certificateRevocationList." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest + */ + UpdateCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); + if (object.certificateRevocationList != null) { + if (typeof object.certificateRevocationList !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.certificateRevocationList: object expected"); + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.fromObject(object.certificateRevocationList); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateRevocationListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateRevocationListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificateRevocationList = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) + object.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.toObject(message.certificateRevocationList, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateRevocationListRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateRevocationListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateRevocationListRequest; + })(); + + v1beta1.CreateReusableConfigRequest = (function() { + + /** + * Properties of a CreateReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICreateReusableConfigRequest + * @property {string|null} [parent] CreateReusableConfigRequest parent + * @property {string|null} [reusableConfigId] CreateReusableConfigRequest reusableConfigId + * @property {google.cloud.security.privateca.v1beta1.IReusableConfig|null} [reusableConfig] CreateReusableConfigRequest reusableConfig + * @property {string|null} [requestId] CreateReusableConfigRequest requestId + */ + + /** + * Constructs a new CreateReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CreateReusableConfigRequest. + * @implements ICreateReusableConfigRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest=} [properties] Properties to set + */ + function CreateReusableConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateReusableConfigRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @instance + */ + CreateReusableConfigRequest.prototype.parent = ""; + + /** + * CreateReusableConfigRequest reusableConfigId. + * @member {string} reusableConfigId + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @instance + */ + CreateReusableConfigRequest.prototype.reusableConfigId = ""; + + /** + * CreateReusableConfigRequest reusableConfig. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfig|null|undefined} reusableConfig + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @instance + */ + CreateReusableConfigRequest.prototype.reusableConfig = null; + + /** + * CreateReusableConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @instance + */ + CreateReusableConfigRequest.prototype.requestId = ""; + + /** + * Creates a new CreateReusableConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest instance + */ + CreateReusableConfigRequest.create = function create(properties) { + return new CreateReusableConfigRequest(properties); + }; + + /** + * Encodes the specified CreateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} message CreateReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReusableConfigRequest.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.reusableConfigId != null && Object.hasOwnProperty.call(message, "reusableConfigId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.reusableConfigId); + if (message.reusableConfig != null && Object.hasOwnProperty.call(message, "reusableConfig")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfig.encode(message.reusableConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} message CreateReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateReusableConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReusableConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.reusableConfigId = reader.string(); + break; + case 3: + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateReusableConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateReusableConfigRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateReusableConfigRequest.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.reusableConfigId != null && message.hasOwnProperty("reusableConfigId")) + if (!$util.isString(message.reusableConfigId)) + return "reusableConfigId: string expected"; + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.verify(message.reusableConfig); + if (error) + return "reusableConfig." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest + */ + CreateReusableConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reusableConfigId != null) + message.reusableConfigId = String(object.reusableConfigId); + if (object.reusableConfig != null) { + if (typeof object.reusableConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.reusableConfig: object expected"); + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.fromObject(object.reusableConfig); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateReusableConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} message CreateReusableConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateReusableConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reusableConfigId = ""; + object.reusableConfig = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reusableConfigId != null && message.hasOwnProperty("reusableConfigId")) + object.reusableConfigId = message.reusableConfigId; + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) + object.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.toObject(message.reusableConfig, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateReusableConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateReusableConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateReusableConfigRequest; + })(); + + v1beta1.DeleteReusableConfigRequest = (function() { + + /** + * Properties of a DeleteReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IDeleteReusableConfigRequest + * @property {string|null} [name] DeleteReusableConfigRequest name + * @property {string|null} [requestId] DeleteReusableConfigRequest requestId + */ + + /** + * Constructs a new DeleteReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a DeleteReusableConfigRequest. + * @implements IDeleteReusableConfigRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest=} [properties] Properties to set + */ + function DeleteReusableConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteReusableConfigRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @instance + */ + DeleteReusableConfigRequest.prototype.name = ""; + + /** + * DeleteReusableConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @instance + */ + DeleteReusableConfigRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteReusableConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest instance + */ + DeleteReusableConfigRequest.create = function create(properties) { + return new DeleteReusableConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} message DeleteReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReusableConfigRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} message DeleteReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReusableConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteReusableConfigRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteReusableConfigRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest + */ + DeleteReusableConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteReusableConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} message DeleteReusableConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteReusableConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteReusableConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteReusableConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteReusableConfigRequest; + })(); + + v1beta1.GetReusableConfigRequest = (function() { + + /** + * Properties of a GetReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IGetReusableConfigRequest + * @property {string|null} [name] GetReusableConfigRequest name + */ + + /** + * Constructs a new GetReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a GetReusableConfigRequest. + * @implements IGetReusableConfigRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest=} [properties] Properties to set + */ + function GetReusableConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetReusableConfigRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @instance + */ + GetReusableConfigRequest.prototype.name = ""; + + /** + * Creates a new GetReusableConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} GetReusableConfigRequest instance + */ + GetReusableConfigRequest.create = function create(properties) { + return new GetReusableConfigRequest(properties); + }; + + /** + * Encodes the specified GetReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest} message GetReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReusableConfigRequest.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 GetReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetReusableConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest} message GetReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetReusableConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} GetReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReusableConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest(); + 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 GetReusableConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} GetReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetReusableConfigRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetReusableConfigRequest.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 GetReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} GetReusableConfigRequest + */ + GetReusableConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetReusableConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.GetReusableConfigRequest} message GetReusableConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetReusableConfigRequest.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 GetReusableConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetReusableConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetReusableConfigRequest; + })(); + + v1beta1.ListReusableConfigsRequest = (function() { + + /** + * Properties of a ListReusableConfigsRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListReusableConfigsRequest + * @property {string|null} [parent] ListReusableConfigsRequest parent + * @property {number|null} [pageSize] ListReusableConfigsRequest pageSize + * @property {string|null} [pageToken] ListReusableConfigsRequest pageToken + * @property {string|null} [filter] ListReusableConfigsRequest filter + * @property {string|null} [orderBy] ListReusableConfigsRequest orderBy + */ + + /** + * Constructs a new ListReusableConfigsRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListReusableConfigsRequest. + * @implements IListReusableConfigsRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest=} [properties] Properties to set + */ + function ListReusableConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListReusableConfigsRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @instance + */ + ListReusableConfigsRequest.prototype.parent = ""; + + /** + * ListReusableConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @instance + */ + ListReusableConfigsRequest.prototype.pageSize = 0; + + /** + * ListReusableConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @instance + */ + ListReusableConfigsRequest.prototype.pageToken = ""; + + /** + * ListReusableConfigsRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @instance + */ + ListReusableConfigsRequest.prototype.filter = ""; + + /** + * ListReusableConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @instance + */ + ListReusableConfigsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListReusableConfigsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} ListReusableConfigsRequest instance + */ + ListReusableConfigsRequest.create = function create(properties) { + return new ListReusableConfigsRequest(properties); + }; + + /** + * Encodes the specified ListReusableConfigsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest} message ListReusableConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReusableConfigsRequest.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 ListReusableConfigsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest} message ListReusableConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReusableConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReusableConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} ListReusableConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReusableConfigsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest(); + 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 ListReusableConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} ListReusableConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReusableConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReusableConfigsRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReusableConfigsRequest.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 ListReusableConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} ListReusableConfigsRequest + */ + ListReusableConfigsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest(); + 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 ListReusableConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} message ListReusableConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReusableConfigsRequest.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 ListReusableConfigsRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListReusableConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListReusableConfigsRequest; + })(); + + v1beta1.ListReusableConfigsResponse = (function() { + + /** + * Properties of a ListReusableConfigsResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IListReusableConfigsResponse + * @property {Array.|null} [reusableConfigs] ListReusableConfigsResponse reusableConfigs + * @property {string|null} [nextPageToken] ListReusableConfigsResponse nextPageToken + * @property {Array.|null} [unreachable] ListReusableConfigsResponse unreachable + */ + + /** + * Constructs a new ListReusableConfigsResponse. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a ListReusableConfigsResponse. + * @implements IListReusableConfigsResponse + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse=} [properties] Properties to set + */ + function ListReusableConfigsResponse(properties) { + this.reusableConfigs = []; + 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]]; + } + + /** + * ListReusableConfigsResponse reusableConfigs. + * @member {Array.} reusableConfigs + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @instance + */ + ListReusableConfigsResponse.prototype.reusableConfigs = $util.emptyArray; + + /** + * ListReusableConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @instance + */ + ListReusableConfigsResponse.prototype.nextPageToken = ""; + + /** + * ListReusableConfigsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @instance + */ + ListReusableConfigsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListReusableConfigsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} ListReusableConfigsResponse instance + */ + ListReusableConfigsResponse.create = function create(properties) { + return new ListReusableConfigsResponse(properties); + }; + + /** + * Encodes the specified ListReusableConfigsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse} message ListReusableConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReusableConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reusableConfigs != null && message.reusableConfigs.length) + for (var i = 0; i < message.reusableConfigs.length; ++i) + $root.google.cloud.security.privateca.v1beta1.ReusableConfig.encode(message.reusableConfigs[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 ListReusableConfigsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse} message ListReusableConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListReusableConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListReusableConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} ListReusableConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReusableConfigsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.reusableConfigs && message.reusableConfigs.length)) + message.reusableConfigs = []; + message.reusableConfigs.push($root.google.cloud.security.privateca.v1beta1.ReusableConfig.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 ListReusableConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} ListReusableConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListReusableConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListReusableConfigsResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListReusableConfigsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reusableConfigs != null && message.hasOwnProperty("reusableConfigs")) { + if (!Array.isArray(message.reusableConfigs)) + return "reusableConfigs: array expected"; + for (var i = 0; i < message.reusableConfigs.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.verify(message.reusableConfigs[i]); + if (error) + return "reusableConfigs." + 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 ListReusableConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} ListReusableConfigsResponse + */ + ListReusableConfigsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse(); + if (object.reusableConfigs) { + if (!Array.isArray(object.reusableConfigs)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.reusableConfigs: array expected"); + message.reusableConfigs = []; + for (var i = 0; i < object.reusableConfigs.length; ++i) { + if (typeof object.reusableConfigs[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.reusableConfigs: object expected"); + message.reusableConfigs[i] = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.fromObject(object.reusableConfigs[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.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 ListReusableConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse} message ListReusableConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListReusableConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.reusableConfigs = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.reusableConfigs && message.reusableConfigs.length) { + object.reusableConfigs = []; + for (var j = 0; j < message.reusableConfigs.length; ++j) + object.reusableConfigs[j] = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.toObject(message.reusableConfigs[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 ListReusableConfigsResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListReusableConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListReusableConfigsResponse; + })(); + + v1beta1.UpdateReusableConfigRequest = (function() { + + /** + * Properties of an UpdateReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IUpdateReusableConfigRequest + * @property {google.cloud.security.privateca.v1beta1.IReusableConfig|null} [reusableConfig] UpdateReusableConfigRequest reusableConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReusableConfigRequest updateMask + * @property {string|null} [requestId] UpdateReusableConfigRequest requestId + */ + + /** + * Constructs a new UpdateReusableConfigRequest. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an UpdateReusableConfigRequest. + * @implements IUpdateReusableConfigRequest + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest=} [properties] Properties to set + */ + function UpdateReusableConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateReusableConfigRequest reusableConfig. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfig|null|undefined} reusableConfig + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @instance + */ + UpdateReusableConfigRequest.prototype.reusableConfig = null; + + /** + * UpdateReusableConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @instance + */ + UpdateReusableConfigRequest.prototype.updateMask = null; + + /** + * UpdateReusableConfigRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @instance + */ + UpdateReusableConfigRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateReusableConfigRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest instance + */ + UpdateReusableConfigRequest.create = function create(properties) { + return new UpdateReusableConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} message UpdateReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReusableConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reusableConfig != null && Object.hasOwnProperty.call(message, "reusableConfig")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfig.encode(message.reusableConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} message UpdateReusableConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReusableConfigRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateReusableConfigRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateReusableConfigRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.verify(message.reusableConfig); + if (error) + return "reusableConfig." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest + */ + UpdateReusableConfigRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest(); + if (object.reusableConfig != null) { + if (typeof object.reusableConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.reusableConfig: object expected"); + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.fromObject(object.reusableConfig); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateReusableConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @static + * @param {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} message UpdateReusableConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateReusableConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.reusableConfig = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) + object.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.toObject(message.reusableConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateReusableConfigRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateReusableConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateReusableConfigRequest; + })(); + + v1beta1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.security.privateca.v1beta1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1beta1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.target = reader.string(); + break; + case 4: + message.verb = reader.string(); + break; + case 5: + message.statusMessage = reader.string(); + break; + case 6: + message.requestedCancellation = reader.bool(); + break; + case 7: + message.apiVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.OperationMetadata) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1beta1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + return v1beta1; + })(); + + return privateca; + })(); + + return security; + })(); + + 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 + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ + + /** + * 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; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * 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.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo")) + $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).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; + case 1049: + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + 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"; + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) { + var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]); + if (error) + return ".google.longrunning.operationInfo." + error; + } + 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]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + 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.longrunning.operationInfo"] = null; + 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.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], 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.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function 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.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function 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.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function 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.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function 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.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function 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.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function 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.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function 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.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function 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.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function 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.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + 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 BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + 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 BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BytesValue; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @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.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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.Any(); + 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; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @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 + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + 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 an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + 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 Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + 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; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.longrunning = (function() { + + /** + * Namespace longrunning. + * @memberof google + * @namespace + */ + var longrunning = {}; + + longrunning.Operations = (function() { + + /** + * Constructs a new Operations service. + * @memberof google.longrunning + * @classdesc Represents an Operations + * @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 Operations(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations; + + /** + * Creates new Operations service using the specified rpc implementation. + * @function create + * @memberof google.longrunning.Operations + * @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 {Operations} RPC service. Useful where requests and/or responses are streamed. + */ + Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.longrunning.Operations#listOperations}. + * @memberof google.longrunning.Operations + * @typedef ListOperationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse + */ + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) { + return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback); + }, "name", { value: "ListOperations" }); + + /** + * Calls ListOperations. + * @function listOperations + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#getOperation}. + * @memberof google.longrunning.Operations + * @typedef GetOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) { + return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "GetOperation" }); + + /** + * Calls GetOperation. + * @function getOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * @memberof google.longrunning.Operations + * @typedef DeleteOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) { + return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteOperation" }); + + /** + * Calls DeleteOperation. + * @function deleteOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * @memberof google.longrunning.Operations + * @typedef CancelOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) { + return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelOperation" }); + + /** + * Calls CancelOperation. + * @function cancelOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * @memberof google.longrunning.Operations + * @typedef WaitOperationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) { + return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "WaitOperation" }); + + /** + * Calls WaitOperation. + * @function waitOperation + * @memberof google.longrunning.Operations + * @instance + * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Operations; + })(); + + longrunning.Operation = (function() { + + /** + * Properties of an Operation. + * @memberof google.longrunning + * @interface IOperation + * @property {string|null} [name] Operation name + * @property {google.protobuf.IAny|null} [metadata] Operation metadata + * @property {boolean|null} [done] Operation done + * @property {google.rpc.IStatus|null} [error] Operation error + * @property {google.protobuf.IAny|null} [response] Operation response + */ + + /** + * Constructs a new Operation. + * @memberof google.longrunning + * @classdesc Represents an Operation. + * @implements IOperation + * @constructor + * @param {google.longrunning.IOperation=} [properties] Properties to set + */ + function Operation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Operation name. + * @member {string} name + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.name = ""; + + /** + * Operation metadata. + * @member {google.protobuf.IAny|null|undefined} metadata + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.metadata = null; + + /** + * Operation done. + * @member {boolean} done + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.done = false; + + /** + * Operation error. + * @member {google.rpc.IStatus|null|undefined} error + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.error = null; + + /** + * Operation response. + * @member {google.protobuf.IAny|null|undefined} response + * @memberof google.longrunning.Operation + * @instance + */ + Operation.prototype.response = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Operation result. + * @member {"error"|"response"|undefined} result + * @memberof google.longrunning.Operation + * @instance + */ + Object.defineProperty(Operation.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["error", "response"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Operation instance using the specified properties. + * @function create + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation=} [properties] Properties to set + * @returns {google.longrunning.Operation} Operation instance + */ + Operation.create = function create(properties) { + return new Operation(properties); + }; + + /** + * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encode + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.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.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.done != null && Object.hasOwnProperty.call(message, "done")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.response != null && Object.hasOwnProperty.call(message, "response")) + $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.IOperation} message Operation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Operation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Operation message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.done = reader.bool(); + break; + case 4: + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + case 5: + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Operation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.Operation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.Operation} Operation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Operation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Operation message. + * @function verify + * @memberof google.longrunning.Operation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Operation.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.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Any.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.done != null && message.hasOwnProperty("done")) + if (typeof message.done !== "boolean") + return "done: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) { + properties.result = 1; + { + var error = $root.google.rpc.Status.verify(message.error); + if (error) + return "error." + error; + } + } + if (message.response != null && message.hasOwnProperty("response")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.protobuf.Any.verify(message.response); + if (error) + return "response." + error; + } + } + return null; + }; + + /** + * Creates an Operation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.Operation + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.Operation} Operation + */ + Operation.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.Operation) + return object; + var message = new $root.google.longrunning.Operation(); + if (object.name != null) + message.name = String(object.name); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.longrunning.Operation.metadata: object expected"); + message.metadata = $root.google.protobuf.Any.fromObject(object.metadata); + } + if (object.done != null) + message.done = Boolean(object.done); + if (object.error != null) { + if (typeof object.error !== "object") + throw TypeError(".google.longrunning.Operation.error: object expected"); + message.error = $root.google.rpc.Status.fromObject(object.error); + } + if (object.response != null) { + if (typeof object.response !== "object") + throw TypeError(".google.longrunning.Operation.response: object expected"); + message.response = $root.google.protobuf.Any.fromObject(object.response); + } + return message; + }; + + /** + * Creates a plain object from an Operation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.Operation + * @static + * @param {google.longrunning.Operation} message Operation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Operation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.metadata = null; + object.done = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options); + if (message.done != null && message.hasOwnProperty("done")) + object.done = message.done; + if (message.error != null && message.hasOwnProperty("error")) { + object.error = $root.google.rpc.Status.toObject(message.error, options); + if (options.oneofs) + object.result = "error"; + } + if (message.response != null && message.hasOwnProperty("response")) { + object.response = $root.google.protobuf.Any.toObject(message.response, options); + if (options.oneofs) + object.result = "response"; + } + return object; + }; + + /** + * Converts this Operation to JSON. + * @function toJSON + * @memberof google.longrunning.Operation + * @instance + * @returns {Object.} JSON object + */ + Operation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Operation; + })(); + + longrunning.GetOperationRequest = (function() { + + /** + * Properties of a GetOperationRequest. + * @memberof google.longrunning + * @interface IGetOperationRequest + * @property {string|null} [name] GetOperationRequest name + */ + + /** + * Constructs a new GetOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a GetOperationRequest. + * @implements IGetOperationRequest + * @constructor + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + */ + function GetOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOperationRequest name. + * @member {string} name + * @memberof google.longrunning.GetOperationRequest + * @instance + */ + GetOperationRequest.prototype.name = ""; + + /** + * Creates a new GetOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance + */ + GetOperationRequest.create = function create(properties) { + return new GetOperationRequest(properties); + }; + + /** + * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.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 GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest(); + 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 GetOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOperationRequest message. + * @function verify + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOperationRequest.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 GetOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.GetOperationRequest} GetOperationRequest + */ + GetOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.GetOperationRequest) + return object; + var message = new $root.google.longrunning.GetOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {google.longrunning.GetOperationRequest} message GetOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOperationRequest.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 GetOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.GetOperationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetOperationRequest; + })(); + + longrunning.ListOperationsRequest = (function() { + + /** + * Properties of a ListOperationsRequest. + * @memberof google.longrunning + * @interface IListOperationsRequest + * @property {string|null} [name] ListOperationsRequest name + * @property {string|null} [filter] ListOperationsRequest filter + * @property {number|null} [pageSize] ListOperationsRequest pageSize + * @property {string|null} [pageToken] ListOperationsRequest pageToken + */ + + /** + * Constructs a new ListOperationsRequest. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsRequest. + * @implements IListOperationsRequest + * @constructor + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + */ + function ListOperationsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsRequest name. + * @member {string} name + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.name = ""; + + /** + * ListOperationsRequest filter. + * @member {string} filter + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.filter = ""; + + /** + * ListOperationsRequest pageSize. + * @member {number} pageSize + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageSize = 0; + + /** + * ListOperationsRequest pageToken. + * @member {string} pageToken + * @memberof google.longrunning.ListOperationsRequest + * @instance + */ + ListOperationsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListOperationsRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance + */ + ListOperationsRequest.create = function create(properties) { + return new ListOperationsRequest(properties); + }; + + /** + * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + 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.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.name); + return writer; + }; + + /** + * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: + message.name = reader.string(); + break; + case 1: + message.filter = 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 ListOperationsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsRequest message. + * @function verify + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsRequest.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.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: 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 ListOperationsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest + */ + ListOperationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsRequest) + return object; + var message = new $root.google.longrunning.ListOperationsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.filter != null) + message.filter = String(object.filter); + 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 ListOperationsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.name = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ListOperationsRequest to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsRequest + * @instance + * @returns {Object.} JSON object + */ + ListOperationsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsRequest; + })(); + + longrunning.ListOperationsResponse = (function() { + + /** + * Properties of a ListOperationsResponse. + * @memberof google.longrunning + * @interface IListOperationsResponse + * @property {Array.|null} [operations] ListOperationsResponse operations + * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken + */ + + /** + * Constructs a new ListOperationsResponse. + * @memberof google.longrunning + * @classdesc Represents a ListOperationsResponse. + * @implements IListOperationsResponse + * @constructor + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + */ + function ListOperationsResponse(properties) { + this.operations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOperationsResponse operations. + * @member {Array.} operations + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.operations = $util.emptyArray; + + /** + * ListOperationsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.longrunning.ListOperationsResponse + * @instance + */ + ListOperationsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOperationsResponse instance using the specified properties. + * @function create + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance + */ + ListOperationsResponse.create = function create(properties) { + return new ListOperationsResponse(properties); + }; + + /** + * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operations != null && message.operations.length) + for (var i = 0; i < message.operations.length; ++i) + $root.google.longrunning.Operation.encode(message.operations[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 ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + case 2: + message.nextPageToken = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOperationsResponse message. + * @function verify + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOperationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operations != null && message.hasOwnProperty("operations")) { + if (!Array.isArray(message.operations)) + return "operations: array expected"; + for (var i = 0; i < message.operations.length; ++i) { + var error = $root.google.longrunning.Operation.verify(message.operations[i]); + if (error) + return "operations." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse + */ + ListOperationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.ListOperationsResponse) + return object; + var message = new $root.google.longrunning.ListOperationsResponse(); + if (object.operations) { + if (!Array.isArray(object.operations)) + throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected"); + message.operations = []; + for (var i = 0; i < object.operations.length; ++i) { + if (typeof object.operations[i] !== "object") + throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected"); + message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOperationsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.operations = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.operations && message.operations.length) { + object.operations = []; + for (var j = 0; j < message.operations.length; ++j) + object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOperationsResponse to JSON. + * @function toJSON + * @memberof google.longrunning.ListOperationsResponse + * @instance + * @returns {Object.} JSON object + */ + ListOperationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListOperationsResponse; + })(); + + longrunning.CancelOperationRequest = (function() { + + /** + * Properties of a CancelOperationRequest. + * @memberof google.longrunning + * @interface ICancelOperationRequest + * @property {string|null} [name] CancelOperationRequest name + */ + + /** + * Constructs a new CancelOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a CancelOperationRequest. + * @implements ICancelOperationRequest + * @constructor + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + */ + function CancelOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOperationRequest name. + * @member {string} name + * @memberof google.longrunning.CancelOperationRequest + * @instance + */ + CancelOperationRequest.prototype.name = ""; + + /** + * Creates a new CancelOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance + */ + CancelOperationRequest.create = function create(properties) { + return new CancelOperationRequest(properties); + }; + + /** + * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.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 CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest(); + 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 CancelOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOperationRequest message. + * @function verify + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOperationRequest.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 CancelOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest + */ + CancelOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.CancelOperationRequest) + return object; + var message = new $root.google.longrunning.CancelOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOperationRequest.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 CancelOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.CancelOperationRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelOperationRequest; + })(); + + longrunning.DeleteOperationRequest = (function() { + + /** + * Properties of a DeleteOperationRequest. + * @memberof google.longrunning + * @interface IDeleteOperationRequest + * @property {string|null} [name] DeleteOperationRequest name + */ + + /** + * Constructs a new DeleteOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a DeleteOperationRequest. + * @implements IDeleteOperationRequest + * @constructor + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + */ + function DeleteOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteOperationRequest name. + * @member {string} name + * @memberof google.longrunning.DeleteOperationRequest + * @instance + */ + DeleteOperationRequest.prototype.name = ""; + + /** + * Creates a new DeleteOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance + */ + DeleteOperationRequest.create = function create(properties) { + return new DeleteOperationRequest(properties); + }; + + /** + * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.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 DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest(); + 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 DeleteOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteOperationRequest message. + * @function verify + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteOperationRequest.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 DeleteOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest + */ + DeleteOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.DeleteOperationRequest) + return object; + var message = new $root.google.longrunning.DeleteOperationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteOperationRequest.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 DeleteOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.DeleteOperationRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteOperationRequest; + })(); + + longrunning.WaitOperationRequest = (function() { + + /** + * Properties of a WaitOperationRequest. + * @memberof google.longrunning + * @interface IWaitOperationRequest + * @property {string|null} [name] WaitOperationRequest name + * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout + */ + + /** + * Constructs a new WaitOperationRequest. + * @memberof google.longrunning + * @classdesc Represents a WaitOperationRequest. + * @implements IWaitOperationRequest + * @constructor + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + */ + function WaitOperationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WaitOperationRequest name. + * @member {string} name + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.name = ""; + + /** + * WaitOperationRequest timeout. + * @member {google.protobuf.IDuration|null|undefined} timeout + * @memberof google.longrunning.WaitOperationRequest + * @instance + */ + WaitOperationRequest.prototype.timeout = null; + + /** + * Creates a new WaitOperationRequest instance using the specified properties. + * @function create + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance + */ + WaitOperationRequest.create = function create(properties) { + return new WaitOperationRequest(properties); + }; + + /** + * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.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.timeout != null && Object.hasOwnProperty.call(message, "timeout")) + $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WaitOperationRequest message. + * @function verify + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WaitOperationRequest.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.timeout != null && message.hasOwnProperty("timeout")) { + var error = $root.google.protobuf.Duration.verify(message.timeout); + if (error) + return "timeout." + error; + } + return null; + }; + + /** + * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest + */ + WaitOperationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.WaitOperationRequest) + return object; + var message = new $root.google.longrunning.WaitOperationRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.timeout != null) { + if (typeof object.timeout !== "object") + throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected"); + message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout); + } + return message; + }; + + /** + * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WaitOperationRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.timeout = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.timeout != null && message.hasOwnProperty("timeout")) + object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options); + return object; + }; + + /** + * Converts this WaitOperationRequest to JSON. + * @function toJSON + * @memberof google.longrunning.WaitOperationRequest + * @instance + * @returns {Object.} JSON object + */ + WaitOperationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return WaitOperationRequest; + })(); + + longrunning.OperationInfo = (function() { + + /** + * Properties of an OperationInfo. + * @memberof google.longrunning + * @interface IOperationInfo + * @property {string|null} [responseType] OperationInfo responseType + * @property {string|null} [metadataType] OperationInfo metadataType + */ + + /** + * Constructs a new OperationInfo. + * @memberof google.longrunning + * @classdesc Represents an OperationInfo. + * @implements IOperationInfo + * @constructor + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + */ + function OperationInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationInfo responseType. + * @member {string} responseType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.responseType = ""; + + /** + * OperationInfo metadataType. + * @member {string} metadataType + * @memberof google.longrunning.OperationInfo + * @instance + */ + OperationInfo.prototype.metadataType = ""; + + /** + * Creates a new OperationInfo instance using the specified properties. + * @function create + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo=} [properties] Properties to set + * @returns {google.longrunning.OperationInfo} OperationInfo instance + */ + OperationInfo.create = function create(properties) { + return new OperationInfo(properties); + }; + + /** + * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encode + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType); + if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType); + return writer; + }; + + /** + * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer. + * @function decode + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.responseType = reader.string(); + break; + case 2: + message.metadataType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.longrunning.OperationInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.longrunning.OperationInfo} OperationInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationInfo message. + * @function verify + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.responseType != null && message.hasOwnProperty("responseType")) + if (!$util.isString(message.responseType)) + return "responseType: string expected"; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + if (!$util.isString(message.metadataType)) + return "metadataType: string expected"; + return null; + }; + + /** + * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {Object.} object Plain object + * @returns {google.longrunning.OperationInfo} OperationInfo + */ + OperationInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.longrunning.OperationInfo) + return object; + var message = new $root.google.longrunning.OperationInfo(); + if (object.responseType != null) + message.responseType = String(object.responseType); + if (object.metadataType != null) + message.metadataType = String(object.metadataType); + return message; + }; + + /** + * Creates a plain object from an OperationInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.longrunning.OperationInfo + * @static + * @param {google.longrunning.OperationInfo} message OperationInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.responseType = ""; + object.metadataType = ""; + } + if (message.responseType != null && message.hasOwnProperty("responseType")) + object.responseType = message.responseType; + if (message.metadataType != null && message.hasOwnProperty("metadataType")) + object.metadataType = message.metadataType; + return object; + }; + + /** + * Converts this OperationInfo to JSON. + * @function toJSON + * @memberof google.longrunning.OperationInfo + * @instance + * @returns {Object.} JSON object + */ + OperationInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationInfo; + })(); + + return longrunning; + })(); + + 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; + })(); + + return $root; +}); diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json new file mode 100644 index 00000000000..7dce0554a92 --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -0,0 +1,3557 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "security": { + "nested": { + "privateca": { + "nested": { + "v1beta1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Security.PrivateCA.V1Beta1", + "go_package": "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1;privateca", + "java_multiple_files": true, + "java_outer_classname": "PrivateCaProto", + "java_package": "com.google.cloud.security.privateca.v1beta1" + }, + "nested": { + "CertificateAuthority": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/CertificateAuthority", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "tier": { + "type": "Tier", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "config": { + "type": "CertificateConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "lifetime": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "keySpec": { + "type": "KeyVersionSpec", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "certificatePolicy": { + "type": "CertificateAuthorityPolicy", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "issuingOptions": { + "type": "IssuingOptions", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subordinateConfig": { + "type": "SubordinateConfig", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "state": { + "type": "State", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCaCertificates": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "caCertificateDescriptions": { + "rule": "repeated", + "type": "CertificateDescription", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcsBucket": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "accessUrls": { + "type": "AccessUrls", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "IssuingOptions": { + "fields": { + "includeCaCertUrl": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "includeCrlAccessUrl": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CertificateAuthorityPolicy": { + "oneofs": { + "configPolicy": { + "oneof": [ + "allowedConfigList", + "overwriteConfigValues" + ] + } + }, + "fields": { + "allowedConfigList": { + "type": "AllowedConfigList", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "overwriteConfigValues": { + "type": "ReusableConfigWrapper", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedLocationsAndOrganizations": { + "rule": "repeated", + "type": "Subject", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedCommonNames": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedSans": { + "type": "AllowedSubjectAltNames", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maximumLifetime": { + "type": "google.protobuf.Duration", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedIssuanceModes": { + "type": "IssuanceModes", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AllowedConfigList": { + "fields": { + "allowedConfigValues": { + "rule": "repeated", + "type": "ReusableConfigWrapper", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AllowedSubjectAltNames": { + "fields": { + "allowedDnsNames": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedUris": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedEmailAddresses": { + "rule": "repeated", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedIps": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowGlobbingDnsWildcards": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowCustomSans": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "IssuanceModes": { + "fields": { + "allowCsrBasedIssuance": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "allowConfigBasedIssuance": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "AccessUrls": { + "fields": { + "caCertificateAccessUrl": { + "type": "string", + "id": 1 + }, + "crlAccessUrl": { + "type": "string", + "id": 2 + } + } + }, + "KeyVersionSpec": { + "oneofs": { + "KeyVersion": { + "oneof": [ + "cloudKmsKeyVersion", + "algorithm" + ] + } + }, + "fields": { + "cloudKmsKeyVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "algorithm": { + "type": "SignHashAlgorithm", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SELF_SIGNED": 1, + "SUBORDINATE": 2 + } + }, + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "ENTERPRISE": 1, + "DEVOPS": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + "PENDING_ACTIVATION": 3, + "PENDING_DELETION": 4 + } + }, + "SignHashAlgorithm": { + "values": { + "SIGN_HASH_ALGORITHM_UNSPECIFIED": 0, + "RSA_PSS_2048_SHA_256": 1, + "RSA_PSS_3072_SHA_256": 2, + "RSA_PSS_4096_SHA_256": 3, + "EC_P256_SHA256": 4, + "EC_P384_SHA384": 5 + } + } + } + }, + "CertificateRevocationList": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/CertificateRevocationList", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sequenceNumber": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revokedCertificates": { + "rule": "repeated", + "type": "RevokedCertificate", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCrl": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "accessUrl": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RevokedCertificate": { + "fields": { + "certificate": { + "type": "string", + "id": 1 + }, + "hexSerialNumber": { + "type": "string", + "id": 2 + }, + "revocationReason": { + "type": "RevocationReason", + "id": 3 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "SUPERSEDED": 2 + } + } + } + }, + "Certificate": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/Certificate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}" + }, + "oneofs": { + "certificateConfig": { + "oneof": [ + "pemCsr", + "config" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCsr": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "config": { + "type": "CertificateConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "lifetime": { + "type": "google.protobuf.Duration", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "revocationDetails": { + "type": "RevocationDetails", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCertificate": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "certificateDescription": { + "type": "CertificateDescription", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCertificateChain": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RevocationDetails": { + "fields": { + "revocationState": { + "type": "RevocationReason", + "id": 1 + }, + "revocationTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } + }, + "ReusableConfig": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/ReusableConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/reusableConfigs/{reusable_config}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "values": { + "type": "ReusableConfigValues", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ReusableConfigValues": { + "fields": { + "keyUsage": { + "type": "KeyUsage", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "caOptions": { + "type": "CaOptions", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "policyIds": { + "rule": "repeated", + "type": "ObjectId", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aiaOcspServers": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "additionalExtensions": { + "rule": "repeated", + "type": "X509Extension", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CaOptions": { + "fields": { + "isCa": { + "type": "google.protobuf.BoolValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxIssuerPathLength": { + "type": "google.protobuf.Int32Value", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ReusableConfigWrapper": { + "oneofs": { + "configValues": { + "oneof": [ + "reusableConfig", + "reusableConfigValues" + ] + } + }, + "fields": { + "reusableConfig": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reusableConfigValues": { + "type": "ReusableConfigValues", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SubordinateConfig": { + "oneofs": { + "subordinateConfig": { + "oneof": [ + "certificateAuthority", + "pemIssuerChain" + ] + } + }, + "fields": { + "certificateAuthority": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pemIssuerChain": { + "type": "SubordinateConfigChain", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "SubordinateConfigChain": { + "fields": { + "pemCertificates": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "PublicKey": { + "fields": { + "type": { + "type": "KeyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "key": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "KeyType": { + "values": { + "KEY_TYPE_UNSPECIFIED": 0, + "PEM_RSA_KEY": 1, + "PEM_EC_KEY": 2 + } + } + } + }, + "CertificateConfig": { + "fields": { + "subjectConfig": { + "type": "SubjectConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reusableConfig": { + "type": "ReusableConfigWrapper", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "publicKey": { + "type": "PublicKey", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SubjectConfig": { + "fields": { + "subject": { + "type": "Subject", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "commonName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subjectAltName": { + "type": "SubjectAltNames", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "CertificateDescription": { + "fields": { + "subjectDescription": { + "type": "SubjectDescription", + "id": 1 + }, + "configValues": { + "type": "ReusableConfigValues", + "id": 2 + }, + "publicKey": { + "type": "PublicKey", + "id": 3 + }, + "subjectKeyId": { + "type": "KeyId", + "id": 4 + }, + "authorityKeyId": { + "type": "KeyId", + "id": 5 + }, + "crlDistributionPoints": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "aiaIssuingCertificateUrls": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "certFingerprint": { + "type": "CertificateFingerprint", + "id": 8 + } + }, + "nested": { + "SubjectDescription": { + "fields": { + "subject": { + "type": "Subject", + "id": 1 + }, + "commonName": { + "type": "string", + "id": 2 + }, + "subjectAltName": { + "type": "SubjectAltNames", + "id": 3 + }, + "hexSerialNumber": { + "type": "string", + "id": 4 + }, + "lifetime": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "notBeforeTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "notAfterTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + } + } + }, + "KeyId": { + "fields": { + "keyId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CertificateFingerprint": { + "fields": { + "sha256Hash": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ObjectId": { + "fields": { + "objectIdPath": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "X509Extension": { + "fields": { + "objectId": { + "type": "ObjectId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "critical": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "KeyUsage": { + "fields": { + "baseKeyUsage": { + "type": "KeyUsageOptions", + "id": 1 + }, + "extendedKeyUsage": { + "type": "ExtendedKeyUsageOptions", + "id": 2 + }, + "unknownExtendedKeyUsages": { + "rule": "repeated", + "type": "ObjectId", + "id": 3 + } + }, + "nested": { + "KeyUsageOptions": { + "fields": { + "digitalSignature": { + "type": "bool", + "id": 1 + }, + "contentCommitment": { + "type": "bool", + "id": 2 + }, + "keyEncipherment": { + "type": "bool", + "id": 3 + }, + "dataEncipherment": { + "type": "bool", + "id": 4 + }, + "keyAgreement": { + "type": "bool", + "id": 5 + }, + "certSign": { + "type": "bool", + "id": 6 + }, + "crlSign": { + "type": "bool", + "id": 7 + }, + "encipherOnly": { + "type": "bool", + "id": 8 + }, + "decipherOnly": { + "type": "bool", + "id": 9 + } + } + }, + "ExtendedKeyUsageOptions": { + "fields": { + "serverAuth": { + "type": "bool", + "id": 1 + }, + "clientAuth": { + "type": "bool", + "id": 2 + }, + "codeSigning": { + "type": "bool", + "id": 3 + }, + "emailProtection": { + "type": "bool", + "id": 4 + }, + "timeStamping": { + "type": "bool", + "id": 5 + }, + "ocspSigning": { + "type": "bool", + "id": 6 + } + } + } + } + }, + "Subject": { + "fields": { + "countryCode": { + "type": "string", + "id": 1 + }, + "organization": { + "type": "string", + "id": 2 + }, + "organizationalUnit": { + "type": "string", + "id": 3 + }, + "locality": { + "type": "string", + "id": 4 + }, + "province": { + "type": "string", + "id": 5 + }, + "streetAddress": { + "type": "string", + "id": 6 + }, + "postalCode": { + "type": "string", + "id": 7 + } + } + }, + "SubjectAltNames": { + "fields": { + "dnsNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "uris": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "emailAddresses": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "ipAddresses": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "customSans": { + "rule": "repeated", + "type": "X509Extension", + "id": 5 + } + } + }, + "RevocationReason": { + "values": { + "REVOCATION_REASON_UNSPECIFIED": 0, + "KEY_COMPROMISE": 1, + "CERTIFICATE_AUTHORITY_COMPROMISE": 2, + "AFFILIATION_CHANGED": 3, + "SUPERSEDED": 4, + "CESSATION_OF_OPERATION": 5, + "CERTIFICATE_HOLD": 6, + "PRIVILEGE_WITHDRAWN": 7, + "ATTRIBUTE_AUTHORITY_COMPROMISE": 8 + } + }, + "CertificateAuthorityService": { + "options": { + "(google.api.default_host)": "privateca.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateCertificate": { + "requestType": "CreateCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates", + "(google.api.http).body": "certificate", + "(google.api.method_signature)": "parent,certificate,certificate_id" + } + }, + "GetCertificate": { + "requestType": "GetCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}", + "(google.api.method_signature)": "name" + } + }, + "ListCertificates": { + "requestType": "ListCertificatesRequest", + "responseType": "ListCertificatesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates", + "(google.api.method_signature)": "parent" + } + }, + "RevokeCertificate": { + "requestType": "RevokeCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + } + }, + "UpdateCertificate": { + "requestType": "UpdateCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).patch": "/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}", + "(google.api.http).body": "certificate", + "(google.api.method_signature)": "certificate,update_mask" + } + }, + "ActivateCertificateAuthority": { + "requestType": "ActivateCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:activate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "CreateCertificateAuthority": { + "requestType": "CreateCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities", + "(google.api.http).body": "certificate_authority", + "(google.api.method_signature)": "parent,certificate_authority,certificate_authority_id", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "DisableCertificateAuthority": { + "requestType": "DisableCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:disable", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "EnableCertificateAuthority": { + "requestType": "EnableCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:enable", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "FetchCertificateAuthorityCsr": { + "requestType": "FetchCertificateAuthorityCsrRequest", + "responseType": "FetchCertificateAuthorityCsrResponse", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch", + "(google.api.method_signature)": "name" + } + }, + "GetCertificateAuthority": { + "requestType": "GetCertificateAuthorityRequest", + "responseType": "CertificateAuthority", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}", + "(google.api.method_signature)": "name" + } + }, + "ListCertificateAuthorities": { + "requestType": "ListCertificateAuthoritiesRequest", + "responseType": "ListCertificateAuthoritiesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities", + "(google.api.method_signature)": "parent" + } + }, + "RestoreCertificateAuthority": { + "requestType": "RestoreCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:restore", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "ScheduleDeleteCertificateAuthority": { + "requestType": "ScheduleDeleteCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:scheduleDelete", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "UpdateCertificateAuthority": { + "requestType": "UpdateCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{certificate_authority.name=projects/*/locations/*/certificateAuthorities/*}", + "(google.api.http).body": "certificate_authority", + "(google.api.method_signature)": "certificate_authority,update_mask", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "CreateCertificateRevocationList": { + "requestType": "CreateCertificateRevocationListRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists", + "(google.api.http).body": "certificate_revocation_list", + "(google.api.method_signature)": "parent,certificate_revocation_list,certificate_revocation_list_id", + "(google.longrunning.operation_info).response_type": "CertificateRevocationList", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "GetCertificateRevocationList": { + "requestType": "GetCertificateRevocationListRequest", + "responseType": "CertificateRevocationList", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}", + "(google.api.method_signature)": "name" + } + }, + "ListCertificateRevocationLists": { + "requestType": "ListCertificateRevocationListsRequest", + "responseType": "ListCertificateRevocationListsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists", + "(google.api.method_signature)": "parent" + } + }, + "UpdateCertificateRevocationList": { + "requestType": "UpdateCertificateRevocationListRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{certificate_revocation_list.name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}", + "(google.api.http).body": "certificate_revocation_list", + "(google.api.method_signature)": "certificate_revocation_list,update_mask", + "(google.longrunning.operation_info).response_type": "CertificateRevocationList", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "CreateReusableConfig": { + "requestType": "CreateReusableConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs", + "(google.api.http).body": "reusable_config", + "(google.api.method_signature)": "parent,reusable_config,reusable_config_id", + "(google.longrunning.operation_info).response_type": "ReusableConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + }, + "DeleteReusableConfig": { + "requestType": "DeleteReusableConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.security.privateca.v1beta1.OperationMetadata" + } + }, + "GetReusableConfig": { + "requestType": "GetReusableConfigRequest", + "responseType": "ReusableConfig", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}", + "(google.api.method_signature)": "name" + } + }, + "ListReusableConfigs": { + "requestType": "ListReusableConfigsRequest", + "responseType": "ListReusableConfigsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs", + "(google.api.method_signature)": "parent" + } + }, + "UpdateReusableConfig": { + "requestType": "UpdateReusableConfigRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{reusable_config.name=projects/*/locations/*/reusableConfigs/*}", + "(google.api.http).body": "reusable_config", + "(google.api.method_signature)": "reusable_config,update_mask", + "(google.longrunning.operation_info).response_type": "ReusableConfig", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + } + } + } + }, + "CreateCertificateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "certificateId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "certificate": { + "type": "Certificate", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetCertificateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/Certificate" + } + } + } + }, + "ListCertificatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificatesResponse": { + "fields": { + "certificates": { + "rule": "repeated", + "type": "Certificate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "RevokeCertificateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/Certificate" + } + }, + "reason": { + "type": "RevocationReason", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateCertificateRequest": { + "fields": { + "certificate": { + "type": "Certificate", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ActivateCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "pemCaCertificate": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "subordinateConfig": { + "type": "SubordinateConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateCertificateAuthorityRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "certificateAuthorityId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "certificateAuthority": { + "type": "CertificateAuthority", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DisableCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EnableCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchCertificateAuthorityCsrRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + } + } + }, + "FetchCertificateAuthorityCsrResponse": { + "fields": { + "pemCsr": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + } + } + }, + "ListCertificateAuthoritiesRequest": { + "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, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificateAuthoritiesResponse": { + "fields": { + "certificateAuthorities": { + "rule": "repeated", + "type": "CertificateAuthority", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "RestoreCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ScheduleDeleteCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateCertificateAuthorityRequest": { + "fields": { + "certificateAuthority": { + "type": "CertificateAuthority", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateCertificateRevocationListRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "certificateRevocationListId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "certificateRevocationList": { + "type": "CertificateRevocationList", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetCertificateRevocationListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateRevocationList" + } + } + } + }, + "ListCertificateRevocationListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificateRevocationListsResponse": { + "fields": { + "certificateRevocationLists": { + "rule": "repeated", + "type": "CertificateRevocationList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateCertificateRevocationListRequest": { + "fields": { + "certificateRevocationList": { + "type": "CertificateRevocationList", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateReusableConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "reusableConfigId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reusableConfig": { + "type": "ReusableConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteReusableConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/ReusableConfig" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetReusableConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/ReusableConfig" + } + } + } + }, + "ListReusableConfigsRequest": { + "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, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListReusableConfigsResponse": { + "fields": { + "reusableConfigs": { + "rule": "repeated", + "type": "ReusableConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateReusableConfigRequest": { + "fields": { + "reusableConfig": { + "type": "ReusableConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + } + } + } + } + }, + "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 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "longrunning": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.LongRunning", + "go_package": "google.golang.org/genproto/googleapis/longrunning;longrunning", + "java_multiple_files": true, + "java_outer_classname": "OperationsProto", + "java_package": "com.google.longrunning", + "php_namespace": "Google\\LongRunning" + }, + "nested": { + "operationInfo": { + "type": "google.longrunning.OperationInfo", + "id": 1049, + "extend": "google.protobuf.MethodOptions" + }, + "Operations": { + "options": { + "(google.api.default_host)": "longrunning.googleapis.com" + }, + "methods": { + "ListOperations": { + "requestType": "ListOperationsRequest", + "responseType": "ListOperationsResponse", + "options": { + "(google.api.http).get": "/v1/{name=operations}", + "(google.api.method_signature)": "name,filter" + } + }, + "GetOperation": { + "requestType": "GetOperationRequest", + "responseType": "Operation", + "options": { + "(google.api.http).get": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + } + }, + "DeleteOperation": { + "requestType": "DeleteOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=operations/**}", + "(google.api.method_signature)": "name" + } + }, + "CancelOperation": { + "requestType": "CancelOperationRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{name=operations/**}:cancel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + } + }, + "WaitOperation": { + "requestType": "WaitOperationRequest", + "responseType": "Operation" + } + } + }, + "Operation": { + "oneofs": { + "result": { + "oneof": [ + "error", + "response" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "metadata": { + "type": "google.protobuf.Any", + "id": 2 + }, + "done": { + "type": "bool", + "id": 3 + }, + "error": { + "type": "google.rpc.Status", + "id": 4 + }, + "response": { + "type": "google.protobuf.Any", + "id": 5 + } + } + }, + "GetOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListOperationsRequest": { + "fields": { + "name": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListOperationsResponse": { + "fields": { + "operations": { + "rule": "repeated", + "type": "Operation", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DeleteOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "WaitOperationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "timeout": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "OperationInfo": { + "fields": { + "responseType": { + "type": "string", + "id": 1 + }, + "metadataType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "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 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts new file mode 100644 index 00000000000..2f8b526207a --- /dev/null +++ b/packages/google-cloud-security-privateca/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 * as v1beta1 from './v1beta1'; +const CertificateAuthorityServiceClient = + v1beta1.CertificateAuthorityServiceClient; +export {v1beta1, CertificateAuthorityServiceClient}; +export default {v1beta1, CertificateAuthorityServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts new file mode 100644 index 00000000000..e747dbc56d7 --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -0,0 +1,4509 @@ +// 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, + LROperation, + 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 './certificate_authority_service_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|Certificate Authority Service} manages private + * certificate authorities and issued certificates. + * @class + * @memberof v1beta1 + */ +export class CertificateAuthorityServiceClient { + 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}; + operationsClient: gax.OperationsClient; + certificateAuthorityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CertificateAuthorityServiceClient. + * + * @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 CertificateAuthorityServiceClient; + 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 CertificateAuthorityServiceClient 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 CertificateAuthorityServiceClient).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 = { + certificatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificates/{certificate}' + ), + certificateAuthorityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}' + ), + certificateRevocationListPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}' + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}' + ), + reusableConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/reusableConfigs/{reusable_config}' + ), + }; + + // 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 = { + listCertificates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificates' + ), + listCertificateAuthorities: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificateAuthorities' + ), + listCertificateRevocationLists: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificateRevocationLists' + ), + listReusableConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'reusableConfigs' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? this._gaxModule.protobuf.Root.fromJSON( + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + ) + : this._gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const activateCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const activateCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const createCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const createCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const disableCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const disableCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const enableCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const enableCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const restoreCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const restoreCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const scheduleDeleteCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const scheduleDeleteCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateAuthority' + ) as gax.protobuf.Type; + const updateCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const createCertificateRevocationListResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateRevocationList' + ) as gax.protobuf.Type; + const createCertificateRevocationListMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCertificateRevocationListResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.CertificateRevocationList' + ) as gax.protobuf.Type; + const updateCertificateRevocationListMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const createReusableConfigResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.ReusableConfig' + ) as gax.protobuf.Type; + const createReusableConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteReusableConfigResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteReusableConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + const updateReusableConfigResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.ReusableConfig' + ) as gax.protobuf.Type; + const updateReusableConfigMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1beta1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + activateCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + activateCertificateAuthorityResponse.decode.bind( + activateCertificateAuthorityResponse + ), + activateCertificateAuthorityMetadata.decode.bind( + activateCertificateAuthorityMetadata + ) + ), + createCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createCertificateAuthorityResponse.decode.bind( + createCertificateAuthorityResponse + ), + createCertificateAuthorityMetadata.decode.bind( + createCertificateAuthorityMetadata + ) + ), + disableCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + disableCertificateAuthorityResponse.decode.bind( + disableCertificateAuthorityResponse + ), + disableCertificateAuthorityMetadata.decode.bind( + disableCertificateAuthorityMetadata + ) + ), + enableCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + enableCertificateAuthorityResponse.decode.bind( + enableCertificateAuthorityResponse + ), + enableCertificateAuthorityMetadata.decode.bind( + enableCertificateAuthorityMetadata + ) + ), + restoreCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restoreCertificateAuthorityResponse.decode.bind( + restoreCertificateAuthorityResponse + ), + restoreCertificateAuthorityMetadata.decode.bind( + restoreCertificateAuthorityMetadata + ) + ), + scheduleDeleteCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + scheduleDeleteCertificateAuthorityResponse.decode.bind( + scheduleDeleteCertificateAuthorityResponse + ), + scheduleDeleteCertificateAuthorityMetadata.decode.bind( + scheduleDeleteCertificateAuthorityMetadata + ) + ), + updateCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateAuthorityResponse.decode.bind( + updateCertificateAuthorityResponse + ), + updateCertificateAuthorityMetadata.decode.bind( + updateCertificateAuthorityMetadata + ) + ), + createCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createCertificateRevocationListResponse.decode.bind( + createCertificateRevocationListResponse + ), + createCertificateRevocationListMetadata.decode.bind( + createCertificateRevocationListMetadata + ) + ), + updateCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateRevocationListResponse.decode.bind( + updateCertificateRevocationListResponse + ), + updateCertificateRevocationListMetadata.decode.bind( + updateCertificateRevocationListMetadata + ) + ), + createReusableConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createReusableConfigResponse.decode.bind(createReusableConfigResponse), + createReusableConfigMetadata.decode.bind(createReusableConfigMetadata) + ), + deleteReusableConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteReusableConfigResponse.decode.bind(deleteReusableConfigResponse), + deleteReusableConfigMetadata.decode.bind(deleteReusableConfigMetadata) + ), + updateReusableConfig: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateReusableConfigResponse.decode.bind(updateReusableConfigResponse), + updateReusableConfigMetadata.decode.bind(updateReusableConfigMetadata) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.security.privateca.v1beta1.CertificateAuthorityService', + 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.certificateAuthorityServiceStub) { + return this.certificateAuthorityServiceStub; + } + + // Put together the "service stub" for + // google.cloud.security.privateca.v1beta1.CertificateAuthorityService. + this.certificateAuthorityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.security.privateca.v1beta1.CertificateAuthorityService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.security.privateca.v1beta1 + .CertificateAuthorityService, + 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 certificateAuthorityServiceStubMethods = [ + 'createCertificate', + 'getCertificate', + 'listCertificates', + 'revokeCertificate', + 'updateCertificate', + 'activateCertificateAuthority', + 'createCertificateAuthority', + 'disableCertificateAuthority', + 'enableCertificateAuthority', + 'fetchCertificateAuthorityCsr', + 'getCertificateAuthority', + 'listCertificateAuthorities', + 'restoreCertificateAuthority', + 'scheduleDeleteCertificateAuthority', + 'updateCertificateAuthority', + 'createCertificateRevocationList', + 'getCertificateRevocationList', + 'listCertificateRevocationLists', + 'updateCertificateRevocationList', + 'createReusableConfig', + 'deleteReusableConfig', + 'getReusableConfig', + 'listReusableConfigs', + 'updateReusableConfig', + ]; + for (const methodName of certificateAuthorityServiceStubMethods) { + const callPromise = this.certificateAuthorityServiceStub.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] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.certificateAuthorityServiceStub; + } + + /** + * The DNS address for this API service. + */ + static get servicePath() { + return 'privateca.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + */ + static get apiEndpoint() { + return 'privateca.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 -- + // ------------------- + createCertificate( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | undefined + ), + {} | undefined + ] + >; + createCertificate( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCertificate( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} in a given Project, Location from a particular + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location and {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} + * associated with the {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}, in the format + * `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.certificateId] + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the Enterprise {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|CertificateAuthority.Tier}, + * but is optional and its value is ignored otherwise. + * @param {google.cloud.security.privateca.v1beta1.Certificate} request.certificate + * Required. A {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createCertificate( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | 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.createCertificate(request, options, callback); + } + getCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest + | undefined + ), + {} | undefined + ] + >; + getCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1beta1.Certificate.name|name} of the {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} to get. + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest + | 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.getCertificate(request, options, callback); + } + revokeCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest + | undefined + ), + {} | undefined + ] + >; + revokeCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + revokeCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Revoke a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} in the + * format `projects/* /locations/* /certificateAuthorities/* /certificates/*`. + * @param {google.cloud.security.privateca.v1beta1.RevocationReason} request.reason + * Required. The {@link google.cloud.security.privateca.v1beta1.RevocationReason|RevocationReason} for revoking this certificate. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + revokeCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest + | 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.revokeCertificate(request, options, callback); + } + updateCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest + | undefined + ), + {} | undefined + ] + >; + updateCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Update a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1beta1.Certificate} request.certificate + * Required. {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateCertificate( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest + | 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({ + 'certificate.name': request.certificate!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificate(request, options, callback); + } + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, + ( + | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest + | undefined + ), + {} | undefined + ] + >; + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Fetch a certificate signing request (CSR) from a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} + * that is in state + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION|PENDING_ACTIVATION} and is + * of type {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. The CSR must + * then be signed by the desired parent Certificate Authority, which could be + * another {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} resource, or could be an on-prem + * certificate authority. See also {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, + ( + | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest + | 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.fetchCertificateAuthorityCsr( + request, + options, + callback + ); + } + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest + | undefined + ), + {} | undefined + ] + >; + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.name|name} of the {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} to + * get. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest + | 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.getCertificateAuthority( + request, + options, + callback + ); + } + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest + | undefined + ), + {} | undefined + ] + >; + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.name|name} of the + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} to get. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest + | 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.getCertificateRevocationList( + request, + options, + callback + ); + } + getReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest + | undefined + ), + {} | undefined + ] + >; + getReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, + options: gax.CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link ReusableConfigs.name|name} of the {@link |ReusableConfigs} to get. + * @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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + ( + | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest + | 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.getReusableConfig(request, options, callback); + } + + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Activate a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} that is in state + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION|PENDING_ACTIVATION} and is + * of type {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. After the + * parent Certificate Authority signs a certificate signing request from + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr|FetchCertificateAuthorityCsr}, this method can complete the activation + * process. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} request.pemCaCertificate + * Required. The signed CA certificate issued from + * {@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr|FetchCertificateAuthorityCsrResponse.pem_csr}. + * @param {google.cloud.security.privateca.v1beta1.SubordinateConfig} request.subordinateConfig + * Required. Must include information about the issuer of 'pem_ca_certificate', and any + * further issuers until the self-signed CA. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.activateCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the activateCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkActivateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkActivateCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.activateCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in a given Project and Location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/*`. + * @param {string} request.certificateAuthorityId + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}` + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} request.certificateAuthority + * Required. A {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.createCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the createCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkCreateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkCreateCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Disable a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.disableCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the disableCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkDisableCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkDisableCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.disableCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Enable a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.enableCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the enableCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkEnableCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkEnableCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.enableCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + restoreCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + restoreCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + restoreCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Restore a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} that is scheduled for deletion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + restoreCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.restoreCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the restoreCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkRestoreCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkRestoreCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.restoreCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + scheduleDeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + scheduleDeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + scheduleDeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Schedule a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} for deletion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + scheduleDeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.scheduleDeleteCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the scheduleDeleteCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkScheduleDeleteCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkScheduleDeleteCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.scheduleDeleteCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} request.certificateAuthority + * Required. {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'certificate_authority.name': request.certificateAuthority!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the updateCertificateAuthority() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkUpdateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkUpdateCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + createCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} in a given Project, Location + * for a particular {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location and {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} + * associated with the {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}, in the format + * `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} request.certificateRevocationListId + * Required. It must be unique within a location and match the regular expression + * `[a-zA-Z0-9-]{1,63}` + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList} request.certificateRevocationList + * Required. A {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.createCertificateRevocationList( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the createCertificateRevocationList() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkCreateCertificateRevocationListProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkCreateCertificateRevocationListProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createCertificateRevocationList, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList} request.certificateRevocationList + * Required. {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'certificate_revocation_list.name': + request.certificateRevocationList!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificateRevocationList( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by the updateCertificateRevocationList() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkUpdateCertificateRevocationListProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateCertificateRevocationList, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + createReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} in a given Project and Location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}, in the format + * `projects/* /locations/*`. + * @param {string} request.reusableConfigId + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9-]{1,63}` + * @param {google.cloud.security.privateca.v1beta1.ReusableConfig} request.reusableConfig + * Required. A {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + createReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.createReusableConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by the createReusableConfig() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkCreateReusableConfigProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkCreateReusableConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ReusableConfig, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createReusableConfig, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.ReusableConfig, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + deleteReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * DeleteReusableConfig deletes a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} in the format + * `projects/* /locations/* /reusableConfigs/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + deleteReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.deleteReusableConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by the deleteReusableConfig() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkDeleteReusableConfigProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkDeleteReusableConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteReusableConfig, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + updateReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, + options?: gax.CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, + options: gax.CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1beta1.ReusableConfig} request.reusableConfig + * Required. {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Operation]{@link google.longrunning.Operation}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + updateReusableConfig( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, + optionsOrCallback?: + | gax.CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'reusable_config.name': request.reusableConfig!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateReusableConfig(request, options, callback); + } + /** + * Check the status of the long running operation returned by the updateReusableConfig() method. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * + * @example: + * const decodedOperation = await checkUpdateReusableConfigProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * + */ + async checkUpdateReusableConfigProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ReusableConfig, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateReusableConfig, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.ReusableConfig, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate[], + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + ] + >; + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate + > + ): void; + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate + > + ): void; + /** + * Lists {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 [ListCertificatesRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest} + * 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 + * [ListCertificatesResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate[], + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + ] + > | 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.listCertificates(request, options, callback); + } + + /** + * Equivalent to {@link listCertificates}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listCertificates} 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} on 'data' event. + */ + listCertificatesStream( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + 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.listCertificates.createStream( + this.innerApiCalls.listCertificates as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listCertificates}, 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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. + */ + listCertificatesAsync( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + options?: gax.CallOptions + ): AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.ICertificate + > { + 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.listCertificates.asyncIterate( + this.innerApiCalls['listCertificates'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.ICertificate + >; + } + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[], + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + ] + >; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + > + ): void; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + > + ): void; + /** + * Lists {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. + * 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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority} 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 [ListCertificateAuthoritiesRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} + * 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 + * [ListCertificateAuthoritiesResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[], + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + ] + > | 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.listCertificateAuthorities( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listCertificateAuthorities}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listCertificateAuthorities} 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority} on 'data' event. + */ + listCertificateAuthoritiesStream( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + 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.listCertificateAuthorities.createStream( + this.innerApiCalls.listCertificateAuthorities as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listCertificateAuthorities}, 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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. + */ + listCertificateAuthoritiesAsync( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + options?: gax.CallOptions + ): AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + > { + 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.listCertificateAuthorities.asyncIterate( + this.innerApiCalls['listCertificateAuthorities'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + >; + } + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[], + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + ] + >; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + > + ): void; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + > + ): void; + /** + * Lists {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. + * 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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList} 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 [ListCertificateRevocationListsRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} + * 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 + * [ListCertificateRevocationListsResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[], + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + ] + > | 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.listCertificateRevocationLists( + request, + options, + callback + ); + } + + /** + * Equivalent to {@link listCertificateRevocationLists}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listCertificateRevocationLists} 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList} on 'data' event. + */ + listCertificateRevocationListsStream( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + 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.listCertificateRevocationLists.createStream( + this.innerApiCalls.listCertificateRevocationLists as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listCertificateRevocationLists}, 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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. + */ + listCertificateRevocationListsAsync( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + options?: gax.CallOptions + ): AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + > { + 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.listCertificateRevocationLists.asyncIterate( + this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + >; + } + listReusableConfigs( + request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + options?: gax.CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IReusableConfig[], + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + ] + >; + listReusableConfigs( + request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + options: gax.CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + > + ): void; + listReusableConfigs( + request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + > + ): void; + /** + * Lists {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs} to include in the response. + * Further {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token|ListReusableConfigsResponse.next_page_token} in a subsequent request. If + * unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token|ListReusableConfigsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. + * 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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig} 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 [ListReusableConfigsRequest]{@link google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} + * 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 + * [ListReusableConfigsResponse]{@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + listReusableConfigs( + request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + optionsOrCallback?: + | gax.CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IReusableConfig[], + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + ] + > | 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.listReusableConfigs(request, options, callback); + } + + /** + * Equivalent to {@link listReusableConfigs}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listReusableConfigs} 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs} to include in the response. + * Further {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token|ListReusableConfigsResponse.next_page_token} in a subsequent request. If + * unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token|ListReusableConfigsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig} on 'data' event. + */ + listReusableConfigsStream( + request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + 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.listReusableConfigs.createStream( + this.innerApiCalls.listReusableConfigs as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to {@link listReusableConfigs}, 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 resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs} to include in the response. + * Further {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token|ListReusableConfigsResponse.next_page_token} in a subsequent request. If + * unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token|ListReusableConfigsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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. + */ + listReusableConfigsAsync( + request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + options?: gax.CallOptions + ): AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + > { + 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.listReusableConfigs.asyncIterate( + this.innerApiCalls['listReusableConfigs'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + >; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified certificate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} certificate_authority + * @param {string} certificate + * @returns {string} Resource name string. + */ + certificatePath( + project: string, + location: string, + certificateAuthority: string, + certificate: string + ) { + return this.pathTemplates.certificatePathTemplate.render({ + project: project, + location: location, + certificate_authority: certificateAuthority, + certificate: certificate, + }); + } + + /** + * Parse the project from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .project; + } + + /** + * Parse the location from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .location; + } + + /** + * Parse the certificate_authority from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the certificate_authority. + */ + matchCertificateAuthorityFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .certificate_authority; + } + + /** + * Parse the certificate from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the certificate. + */ + matchCertificateFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .certificate; + } + + /** + * Return a fully-qualified certificateAuthority resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} certificate_authority + * @returns {string} Resource name string. + */ + certificateAuthorityPath( + project: string, + location: string, + certificateAuthority: string + ) { + return this.pathTemplates.certificateAuthorityPathTemplate.render({ + project: project, + location: location, + certificate_authority: certificateAuthority, + }); + } + + /** + * Parse the project from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateAuthorityName(certificateAuthorityName: string) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).project; + } + + /** + * Parse the location from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateAuthorityName(certificateAuthorityName: string) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).location; + } + + /** + * Parse the certificate_authority from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the certificate_authority. + */ + matchCertificateAuthorityFromCertificateAuthorityName( + certificateAuthorityName: string + ) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).certificate_authority; + } + + /** + * Return a fully-qualified certificateRevocationList resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} certificate_authority + * @param {string} certificate_revocation_list + * @returns {string} Resource name string. + */ + certificateRevocationListPath( + project: string, + location: string, + certificateAuthority: string, + certificateRevocationList: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.render({ + project: project, + location: location, + certificate_authority: certificateAuthority, + certificate_revocation_list: certificateRevocationList, + }); + } + + /** + * Parse the project from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).project; + } + + /** + * Parse the location from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).location; + } + + /** + * Parse the certificate_authority from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the certificate_authority. + */ + matchCertificateAuthorityFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).certificate_authority; + } + + /** + * Parse the certificate_revocation_list from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the certificate_revocation_list. + */ + matchCertificateRevocationListFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).certificate_revocation_list; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified reusableConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} reusable_config + * @returns {string} Resource name string. + */ + reusableConfigPath( + project: string, + location: string, + reusableConfig: string + ) { + return this.pathTemplates.reusableConfigPathTemplate.render({ + project: project, + location: location, + reusable_config: reusableConfig, + }); + } + + /** + * Parse the project from ReusableConfig resource. + * + * @param {string} reusableConfigName + * A fully-qualified path representing ReusableConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromReusableConfigName(reusableConfigName: string) { + return this.pathTemplates.reusableConfigPathTemplate.match( + reusableConfigName + ).project; + } + + /** + * Parse the location from ReusableConfig resource. + * + * @param {string} reusableConfigName + * A fully-qualified path representing ReusableConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromReusableConfigName(reusableConfigName: string) { + return this.pathTemplates.reusableConfigPathTemplate.match( + reusableConfigName + ).location; + } + + /** + * Parse the reusable_config from ReusableConfig resource. + * + * @param {string} reusableConfigName + * A fully-qualified path representing ReusableConfig resource. + * @returns {string} A string representing the reusable_config. + */ + matchReusableConfigFromReusableConfigName(reusableConfigName: string) { + return this.pathTemplates.reusableConfigPathTemplate.match( + reusableConfigName + ).reusable_config; + } + + /** + * 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.certificateAuthorityServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json new file mode 100644 index 00000000000..d4306afea1d --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json @@ -0,0 +1,151 @@ +{ + "interfaces": { + "google.cloud.security.privateca.v1beta1.CertificateAuthorityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_deadline_exceeded_unavailable": [ + "UNKNOWN", + "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": { + "CreateCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificates": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "RevokeCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ActivateCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "CreateCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "DisableCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "EnableCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "FetchCertificateAuthorityCsr": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificateAuthorities": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "RestoreCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ScheduleDeleteCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "CreateCertificateRevocationList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificateRevocationList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificateRevocationLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificateRevocationList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "CreateReusableConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "DeleteReusableConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetReusableConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListReusableConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateReusableConfig": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_proto_list.json b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_proto_list.json new file mode 100644 index 00000000000..746af9091f3 --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/security/privateca/v1beta1/resources.proto", + "../../protos/google/cloud/security/privateca/v1beta1/service.proto" +] diff --git a/packages/google-cloud-security-privateca/src/v1beta1/index.ts b/packages/google-cloud-security-privateca/src/v1beta1/index.ts new file mode 100644 index 00000000000..32f3be76643 --- /dev/null +++ b/packages/google-cloud-security-privateca/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 {CertificateAuthorityServiceClient} from './certificate_authority_service_client'; diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata new file mode 100644 index 00000000000..ef12ad557d7 --- /dev/null +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -0,0 +1,37 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "sso://user/sofialeon/nodejs-security-private-ca", + "sha": "daa55eda7900769d3623ed87cec6dd351bcdb1e3" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "3dbeac0d54125b123c8dfd39c774b37473c36944", + "internalRef": "333159182" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "ca095b986918ebf96b6a644bf963131851309bda" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "privateca", + "apiVersion": "v1beta1", + "language": "nodejs", + "generator": "bazel" + } + } + ] +} \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/synth.py b/packages/google-cloud-security-privateca/synth.py new file mode 100644 index 00000000000..a16bed8f81e --- /dev/null +++ b/packages/google-cloud-security-privateca/synth.py @@ -0,0 +1,41 @@ +# 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( + 'privateca', + version, + bazel_target=f"//google/cloud/security/privateca/{version}:security-privateca-{version}-nodejs" + ) + s.copy(library, excludes=[]) + +# Copy common templates +common_templates = gcp.CommonTemplates() +templates = common_templates.node_library( + source_location='build/src', versions=['v1beta1']) +s.copy(templates, excludes=[]) + +node.postprocess_gapic_library() diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..65ca9f6a8c3 --- /dev/null +++ b/packages/google-cloud-security-privateca/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 privateca = require('privateca'); + +function main() { + const certificateAuthorityServiceClient = new privateca.CertificateAuthorityServiceClient(); +} + +main(); diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..ae943c5d664 --- /dev/null +++ b/packages/google-cloud-security-privateca/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 {CertificateAuthorityServiceClient} from 'privateca'; + +function main() { + new CertificateAuthorityServiceClient(); +} + +main(); diff --git a/packages/google-cloud-security-privateca/system-test/install.ts b/packages/google-cloud-security-privateca/system-test/install.ts new file mode 100644 index 00000000000..4c1ba3eb79a --- /dev/null +++ b/packages/google-cloud-security-privateca/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-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts new file mode 100644 index 00000000000..f905f5b84cd --- /dev/null +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -0,0 +1,5471 @@ +// 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 certificateauthorityserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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 stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +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.CertificateAuthorityServiceClient', () => { + it('has servicePath', () => { + const servicePath = + certificateauthorityserviceModule.v1beta1 + .CertificateAuthorityServiceClient.servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + certificateauthorityserviceModule.v1beta1 + .CertificateAuthorityServiceClient.apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + certificateauthorityserviceModule.v1beta1 + .CertificateAuthorityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + await client.initialize(); + assert(client.certificateAuthorityServiceStub); + }); + + it('has close method', () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + 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 certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + 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('createCertificate', () => { + it('invokes createCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.createCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.createCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.createCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createCertificate(request), expectedError); + assert( + (client.innerApiCalls.createCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificate', () => { + it('invokes getCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.getCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.getCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.getCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCertificate(request), expectedError); + assert( + (client.innerApiCalls.getCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('revokeCertificate', () => { + it('invokes revokeCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.revokeCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.revokeCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.revokeCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes revokeCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.revokeCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.revokeCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.revokeCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes revokeCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.revokeCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.revokeCertificate(request), expectedError); + assert( + (client.innerApiCalls.revokeCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateCertificate', () => { + it('invokes updateCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.updateCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.updateCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ); + client.innerApiCalls.updateCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCertificate(request), expectedError); + assert( + (client.innerApiCalls.updateCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('fetchCertificateAuthorityCsr', () => { + it('invokes fetchCertificateAuthorityCsr without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse() + ); + client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( + expectedResponse + ); + const [response] = await client.fetchCertificateAuthorityCsr(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchCertificateAuthorityCsr without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse() + ); + client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.fetchCertificateAuthorityCsr( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchCertificateAuthorityCsr with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.fetchCertificateAuthorityCsr(request), + expectedError + ); + assert( + (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificateAuthority', () => { + it('invokes getCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ); + client.innerApiCalls.getCertificateAuthority = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getCertificateAuthority(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ); + client.innerApiCalls.getCertificateAuthority = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificateAuthority( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificateAuthority with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificateAuthority = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.getCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificateRevocationList', () => { + it('invokes getCertificateRevocationList without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ); + client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getCertificateRevocationList(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificateRevocationList without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ); + client.innerApiCalls.getCertificateRevocationList = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificateRevocationList( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificateRevocationList with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getCertificateRevocationList(request), + expectedError + ); + assert( + (client.innerApiCalls.getCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getReusableConfig', () => { + it('invokes getReusableConfig without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ); + client.innerApiCalls.getReusableConfig = stubSimpleCall(expectedResponse); + const [response] = await client.getReusableConfig(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getReusableConfig without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ); + client.innerApiCalls.getReusableConfig = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getReusableConfig( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1beta1.IReusableConfig | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getReusableConfig with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getReusableConfig = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getReusableConfig(request), expectedError); + assert( + (client.innerApiCalls.getReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('activateCertificateAuthority', () => { + it('invokes activateCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.activateCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes activateCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.activateCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes activateCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.activateCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes activateCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.activateCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkActivateCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkActivateCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkActivateCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkActivateCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createCertificateAuthority', () => { + it('invokes createCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('disableCertificateAuthority', () => { + it('invokes disableCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.disableCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes disableCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.disableCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes disableCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.disableCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes disableCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.disableCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDisableCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDisableCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDisableCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDisableCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('enableCertificateAuthority', () => { + it('invokes enableCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.enableCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes enableCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.enableCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes enableCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.enableCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes enableCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.enableCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkEnableCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkEnableCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEnableCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkEnableCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('restoreCertificateAuthority', () => { + it('invokes restoreCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.restoreCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.restoreCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes restoreCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.restoreCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.restoreCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes restoreCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.restoreCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.restoreCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes restoreCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.restoreCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.restoreCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkRestoreCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkRestoreCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestoreCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkRestoreCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('scheduleDeleteCertificateAuthority', () => { + it('invokes scheduleDeleteCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.scheduleDeleteCertificateAuthority( + request + ); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes scheduleDeleteCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.scheduleDeleteCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes scheduleDeleteCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.scheduleDeleteCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes scheduleDeleteCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.scheduleDeleteCertificateAuthority( + request + ); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkScheduleDeleteCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkScheduleDeleteCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkScheduleDeleteCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkScheduleDeleteCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCertificateAuthority', () => { + it('invokes updateCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createCertificateRevocationList', () => { + it('invokes createCertificateRevocationList without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateRevocationList = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createCertificateRevocationList(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateRevocationList without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateRevocationList = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCertificateRevocationList( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCertificateRevocationList with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateRevocationList = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCertificateRevocationList(request), + expectedError + ); + assert( + (client.innerApiCalls.createCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateRevocationList with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateRevocationList = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createCertificateRevocationList(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateCertificateRevocationListProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateCertificateRevocationListProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateCertificateRevocationListProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateCertificateRevocationListProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCertificateRevocationList', () => { + it('invokes updateCertificateRevocationList without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateCertificateRevocationList(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateRevocationList without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificateRevocationList( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificateRevocationList with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCertificateRevocationList(request), + expectedError + ); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateRevocationList with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCertificateRevocationList(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateCertificateRevocationListProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateCertificateRevocationListProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCertificateRevocationListProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateCertificateRevocationListProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createReusableConfig', () => { + it('invokes createReusableConfig without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReusableConfig = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createReusableConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createReusableConfig without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createReusableConfig = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createReusableConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createReusableConfig with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createReusableConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createReusableConfig(request), expectedError); + assert( + (client.innerApiCalls.createReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createReusableConfig with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createReusableConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createReusableConfig(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateReusableConfigProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateReusableConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateReusableConfigProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateReusableConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteReusableConfig', () => { + it('invokes deleteReusableConfig without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReusableConfig = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.deleteReusableConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteReusableConfig without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteReusableConfig = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteReusableConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteReusableConfig with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReusableConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteReusableConfig(request), expectedError); + assert( + (client.innerApiCalls.deleteReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteReusableConfig with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteReusableConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteReusableConfig(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteReusableConfigProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteReusableConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteReusableConfigProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteReusableConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateReusableConfig', () => { + it('invokes updateReusableConfig without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() + ); + request.reusableConfig = {}; + request.reusableConfig.name = ''; + const expectedHeaderRequestParams = 'reusable_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateReusableConfig = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateReusableConfig(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateReusableConfig without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() + ); + request.reusableConfig = {}; + request.reusableConfig.name = ''; + const expectedHeaderRequestParams = 'reusable_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateReusableConfig = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateReusableConfig( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1beta1.IReusableConfig, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateReusableConfig with call error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() + ); + request.reusableConfig = {}; + request.reusableConfig.name = ''; + const expectedHeaderRequestParams = 'reusable_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReusableConfig = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateReusableConfig(request), expectedError); + assert( + (client.innerApiCalls.updateReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateReusableConfig with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() + ); + request.reusableConfig = {}; + request.reusableConfig.name = ''; + const expectedHeaderRequestParams = 'reusable_config.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateReusableConfig = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateReusableConfig(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateReusableConfig as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateReusableConfigProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateReusableConfigProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateReusableConfigProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateReusableConfigProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listCertificates', () => { + it('invokes listCertificates without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + ]; + client.innerApiCalls.listCertificates = stubSimpleCall(expectedResponse); + const [response] = await client.listCertificates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificates without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + ]; + client.innerApiCalls.listCertificates = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificates( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1beta1.ICertificate[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificates with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCertificates(request), expectedError); + assert( + (client.innerApiCalls.listCertificates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificatesStream without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + ]; + client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.Certificate[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.Certificate + ) => { + 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.listCertificates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificates, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificatesStream with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.Certificate[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.Certificate + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificates, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificates without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.Certificate() + ), + ]; + client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificate[] = []; + const iterable = client.listCertificatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificates with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCertificateAuthorities', () => { + it('invokes listCertificateAuthorities without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + ]; + client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listCertificateAuthorities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateAuthorities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateAuthorities without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + ]; + client.innerApiCalls.listCertificateAuthorities = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificateAuthorities( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateAuthorities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificateAuthorities with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCertificateAuthorities(request), + expectedError + ); + assert( + (client.innerApiCalls.listCertificateAuthorities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateAuthoritiesStream without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + ]; + client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificateAuthoritiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority + ) => { + 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.listCertificateAuthorities + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificateAuthorities, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificateAuthoritiesStream with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificateAuthoritiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificateAuthorities, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateAuthorities without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() + ), + ]; + client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] = []; + const iterable = client.listCertificateAuthoritiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateAuthorities with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificateAuthoritiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCertificateRevocationLists', () => { + it('invokes listCertificateRevocationLists without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + ]; + client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listCertificateRevocationLists(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateRevocationLists as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateRevocationLists without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + ]; + client.innerApiCalls.listCertificateRevocationLists = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificateRevocationLists( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateRevocationLists as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificateRevocationLists with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCertificateRevocationLists(request), + expectedError + ); + assert( + (client.innerApiCalls.listCertificateRevocationLists as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateRevocationListsStream without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + ]; + client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificateRevocationListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList + ) => { + 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.listCertificateRevocationLists + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listCertificateRevocationLists, + request + ) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificateRevocationListsStream with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificateRevocationListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listCertificateRevocationLists, + request + ) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateRevocationLists without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() + ), + ]; + client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] = []; + const iterable = client.listCertificateRevocationListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateRevocationLists with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificateRevocationListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listReusableConfigs', () => { + it('invokes listReusableConfigs without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + ]; + client.innerApiCalls.listReusableConfigs = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listReusableConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listReusableConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listReusableConfigs without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + ]; + client.innerApiCalls.listReusableConfigs = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listReusableConfigs( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listReusableConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listReusableConfigs with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listReusableConfigs = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listReusableConfigs(request), expectedError); + assert( + (client.innerApiCalls.listReusableConfigs as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listReusableConfigsStream without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + ]; + client.descriptors.page.listReusableConfigs.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listReusableConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.ReusableConfig[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.ReusableConfig + ) => { + 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.listReusableConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReusableConfigs, request) + ); + assert.strictEqual( + (client.descriptors.page.listReusableConfigs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listReusableConfigsStream with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listReusableConfigs.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listReusableConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1beta1.ReusableConfig[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1beta1.ReusableConfig + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listReusableConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listReusableConfigs, request) + ); + assert.strictEqual( + (client.descriptors.page.listReusableConfigs + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listReusableConfigs without error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() + ), + ]; + client.descriptors.page.listReusableConfigs.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] = []; + const iterable = client.listReusableConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listReusableConfigs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listReusableConfigs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listReusableConfigs with error', async () => { + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listReusableConfigs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listReusableConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listReusableConfigs + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listReusableConfigs + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('certificate', () => { + const fakePath = '/rendered/path/certificate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + certificate_authority: 'certificateAuthorityValue', + certificate: 'certificateValue', + }; + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificatePath', () => { + const result = client.certificatePath( + 'projectValue', + 'locationValue', + 'certificateAuthorityValue', + 'certificateValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificatePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateName', () => { + const result = client.matchProjectFromCertificateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateName', () => { + const result = client.matchLocationFromCertificateName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateAuthorityFromCertificateName', () => { + const result = client.matchCertificateAuthorityFromCertificateName( + fakePath + ); + assert.strictEqual(result, 'certificateAuthorityValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateFromCertificateName', () => { + const result = client.matchCertificateFromCertificateName(fakePath); + assert.strictEqual(result, 'certificateValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('certificateAuthority', () => { + const fakePath = '/rendered/path/certificateAuthority'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + certificate_authority: 'certificateAuthorityValue', + }; + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificateAuthorityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificateAuthorityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificateAuthorityPath', () => { + const result = client.certificateAuthorityPath( + 'projectValue', + 'locationValue', + 'certificateAuthorityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateAuthorityName', () => { + const result = client.matchProjectFromCertificateAuthorityName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateAuthorityName', () => { + const result = client.matchLocationFromCertificateAuthorityName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateAuthorityFromCertificateAuthorityName', () => { + const result = client.matchCertificateAuthorityFromCertificateAuthorityName( + fakePath + ); + assert.strictEqual(result, 'certificateAuthorityValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('certificateRevocationList', () => { + const fakePath = '/rendered/path/certificateRevocationList'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + certificate_authority: 'certificateAuthorityValue', + certificate_revocation_list: 'certificateRevocationListValue', + }; + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificateRevocationListPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificateRevocationListPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificateRevocationListPath', () => { + const result = client.certificateRevocationListPath( + 'projectValue', + 'locationValue', + 'certificateAuthorityValue', + 'certificateRevocationListValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateRevocationListName', () => { + const result = client.matchProjectFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateRevocationListName', () => { + const result = client.matchLocationFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateAuthorityFromCertificateRevocationListName', () => { + const result = client.matchCertificateAuthorityFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'certificateAuthorityValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateRevocationListFromCertificateRevocationListName', () => { + const result = client.matchCertificateRevocationListFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'certificateRevocationListValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('reusableConfig', () => { + const fakePath = '/rendered/path/reusableConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + reusable_config: 'reusableConfigValue', + }; + const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.reusableConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.reusableConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('reusableConfigPath', () => { + const result = client.reusableConfigPath( + 'projectValue', + 'locationValue', + 'reusableConfigValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.reusableConfigPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromReusableConfigName', () => { + const result = client.matchProjectFromReusableConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.reusableConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromReusableConfigName', () => { + const result = client.matchLocationFromReusableConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.reusableConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchReusableConfigFromReusableConfigName', () => { + const result = client.matchReusableConfigFromReusableConfigName( + fakePath + ); + assert.strictEqual(result, 'reusableConfigValue'); + assert( + (client.pathTemplates.reusableConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-cloud-security-privateca/tsconfig.json b/packages/google-cloud-security-privateca/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-cloud-security-privateca/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-security-privateca/webpack.config.js b/packages/google-cloud-security-privateca/webpack.config.js new file mode 100644 index 00000000000..a5657d95fc4 --- /dev/null +++ b/packages/google-cloud-security-privateca/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: 'CertificateAuthorityService', + filename: './certificate-authority-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 635199aed3621d7670daac5e130b670d6e876dce Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 24 Sep 2020 16:20:54 -0700 Subject: [PATCH 003/113] feat!: stub out initial generation of library (#3) * feat: add samples library --- .../.repo-metadata.json | 2 +- .../google-cloud-security-privateca/README.md | 41 ++++++++++++++- .../linkinator.config.json | 7 ++- .../package.json | 6 ++- .../samples/README.md | 50 +++++++++++++++++++ .../samples/package.json | 23 +++++++++ .../samples/quickstart.js | 45 +++++++++++++++++ .../samples/test/quickstart.test.js | 43 ++++++++++++++++ .../synth.metadata | 10 ++-- .../google-cloud-security-privateca/synth.py | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- 12 files changed, 219 insertions(+), 14 deletions(-) create mode 100644 packages/google-cloud-security-privateca/samples/README.md create mode 100644 packages/google-cloud-security-privateca/samples/package.json create mode 100644 packages/google-cloud-security-privateca/samples/quickstart.js create mode 100644 packages/google-cloud-security-privateca/samples/test/quickstart.test.js diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 9da26270c24..60f63d59fcc 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -3,7 +3,7 @@ "name_pretty": "Google Cloud Certificate Authority", "product_documentation": "https://cloud.google.com/certificate-authority-service", "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", - "issue_tracker": "", + "issue_tracker": "https://b.corp.google.com/components/402191#basic", "release_level": "beta", "language": "nodejs", "repo": "googleapis/nodejs-security-private-ca", diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 3b21bc91369..7e24fd99779 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -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) @@ -55,6 +55,43 @@ npm install privateca ``` +### Using the client library + +```javascript +// Imports the Google Cloud client library + +const { + CertificateAuthorityServiceClient, + // eslint-disable-next-line node/no-extraneous-require +} = require('@google-cloud/security-private-ca'); + +// TODO(developer): replace with your prefered project ID. +// const projectId = 'my-project' + +// Creates a client +const client = new CertificateAuthorityServiceClient(); + +async function listCertificates() { + const res = await client.listCertificates({ + parent: `projects/${projectId}/locations/${location}/certificateAuthorities/${name}`, + }); + return res; +} + +listCertificates(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca/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-security-private-ca&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-security-privateca/linkinator.config.json b/packages/google-cloud-security-privateca/linkinator.config.json index 29a223b6db6..fa63d3d90ad 100644 --- a/packages/google-cloud-security-privateca/linkinator.config.json +++ b/packages/google-cloud-security-privateca/linkinator.config.json @@ -3,7 +3,12 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io" + "img.shields.io", + "https://github.com/googleapis/nodejs-security-private-ca/blob/master/CHANGELOG.md", + "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", + "https://www.npmjs.org/package/privateca", + "https://github.com/googleapis/nodejs-security-private-ca/tree/master/samples", + "https://github.com/googleapis/nodejs-security-private-ca/blob/master/samples/quickstart.js" ], "silent": true, "concurrency": 10 diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 7c2d6b4e912..7d2e44ccb96 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,8 +1,8 @@ { - "name": "privateca", + "name": "@google-cloud/security-private-ca", "version": "0.1.0", "description": "Privateca client for Node.js", - "repository": "googleapis/nodejs-privateca", + "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -31,8 +31,10 @@ "predocs-test": "npm run docs", "docs-test": "linkinator docs", "fix": "gts fix", + "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", + "samples-test": "cd samples/ && npm link ../ && npm test", "system-test": "c8 mocha build/system-test", "test": "c8 mocha build/test" }, diff --git a/packages/google-cloud-security-privateca/samples/README.md b/packages/google-cloud-security-privateca/samples/README.md new file mode 100644 index 00000000000..5d6a6a9dab4 --- /dev/null +++ b/packages/google-cloud-security-privateca/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 + +# [Google Cloud Certificate Authority: Node.js Samples](https://github.com/googleapis/nodejs-security-private-ca) + +[![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-security-private-ca#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Quickstart + +View the [source code](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca&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-security-private-ca&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/certificate-authority-service diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json new file mode 100644 index 00000000000..b30b8a082b0 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -0,0 +1,23 @@ +{ + "name": "nodejs-security-private-ca", + "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/security-private-ca": "0.1.0" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^7.1.0" + } +} diff --git a/packages/google-cloud-security-privateca/samples/quickstart.js b/packages/google-cloud-security-privateca/samples/quickstart.js new file mode 100644 index 00000000000..cb4500ea22e --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/quickstart.js @@ -0,0 +1,45 @@ +// 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. +// + +'use strict'; + +async function main(projectId, location, name) { + // [START cloud_certificate_authority_quickstart] + // Imports the Google Cloud client library + + const { + CertificateAuthorityServiceClient, + } = require('@google-cloud/security-private-ca'); + + // TODO(developer): replace with your prefered project ID. + // const projectId = 'my-project' + + // Creates a client + const client = new CertificateAuthorityServiceClient(); + + async function listCertificates() { + const res = await client.listCertificates({ + parent: `projects/${projectId}/locations/${location}/certificateAuthorities/${name}`, + }); + return res; + } + + listCertificates(); + // [END cloud_certificate_authority_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/test/quickstart.test.js b/packages/google-cloud-security-privateca/samples/test/quickstart.test.js new file mode 100644 index 00000000000..df06bacda40 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/test/quickstart.test.js @@ -0,0 +1,43 @@ +// +// 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. +// + +'use strict'; + +const cp = require('child_process'); +const {describe, it, before} = require('mocha'); +const {assert} = require('chai'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const { + CertificateAuthorityServiceClient, +} = require('@google-cloud/security-private-ca'); + +const client = new CertificateAuthorityServiceClient(); + +describe('Quickstart', () => { + let projectId; + + before(async () => { + projectId = await client.getProjectId(); + }); + + it('should run quickstart', async () => { + // eslint-disable-next-line no-unused-vars + const stdout = execSync( + `node ./quickstart.js ${projectId} 'us-central1' 'test-ca'` + ); + assert.equal(stdout, ''); + }); +}); diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index ef12ad557d7..9451a385a30 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -3,23 +3,23 @@ { "git": { "name": ".", - "remote": "sso://user/sofialeon/nodejs-security-private-ca", - "sha": "daa55eda7900769d3623ed87cec6dd351bcdb1e3" + "remote": "git@github.com:googleapis/nodejs-security-private-ca.git", + "sha": "5479370ec8bc2f9c7cb0c155e4e8fa4c06c83ce2" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "3dbeac0d54125b123c8dfd39c774b37473c36944", - "internalRef": "333159182" + "sha": "7e377ce8f06ced48a79b45d97eebccb8a51f1e28", + "internalRef": "333323660" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ca095b986918ebf96b6a644bf963131851309bda" + "sha": "916c10e8581804df2b48a0f0457d848f3faa582e" } } ], diff --git a/packages/google-cloud-security-privateca/synth.py b/packages/google-cloud-security-privateca/synth.py index a16bed8f81e..fb699636f23 100644 --- a/packages/google-cloud-security-privateca/synth.py +++ b/packages/google-cloud-security-privateca/synth.py @@ -36,6 +36,6 @@ common_templates = gcp.CommonTemplates() templates = common_templates.node_library( source_location='build/src', versions=['v1beta1']) -s.copy(templates, excludes=[]) +s.copy(templates, excludes=["README.md", "package.json"]) node.postprocess_gapic_library() diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js index 65ca9f6a8c3..6d42488f51c 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js @@ -17,7 +17,7 @@ // ** All changes to this file may be overwritten. ** /* eslint-disable node/no-missing-require, no-unused-vars */ -const privateca = require('privateca'); +const privateca = require('@google-cloud/security-private-ca'); function main() { const certificateAuthorityServiceClient = new privateca.CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts index ae943c5d664..6007daba8c3 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts @@ -16,7 +16,7 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {CertificateAuthorityServiceClient} from 'privateca'; +import {CertificateAuthorityServiceClient} from '@google-cloud/security-private-ca'; function main() { new CertificateAuthorityServiceClient(); From 923fb4c57c13ac861e50857f188a597b346a474b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 25 Sep 2020 14:09:32 -0700 Subject: [PATCH 004/113] chore: release 1.0.0 (#1) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../google-cloud-security-privateca/CHANGELOG.md | 14 ++++++++++++++ .../google-cloud-security-privateca/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 packages/google-cloud-security-privateca/CHANGELOG.md diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md new file mode 100644 index 00000000000..c23bb0b9c4c --- /dev/null +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog + +## 1.0.0 (2020-09-24) + + +### ⚠ BREAKING CHANGES + +* stub out initial generation of library (#3) + +### Features + +* initial stub of library ([2f6b4cb](https://www.github.com/googleapis/nodejs-security-private-ca/commit/2f6b4cbc35176aa50bd95a31fc2179b4809b52ee)) +* run synthtool ([daa55ed](https://www.github.com/googleapis/nodejs-security-private-ca/commit/daa55eda7900769d3623ed87cec6dd351bcdb1e3)) +* stub out initial generation of library ([#3](https://www.github.com/googleapis/nodejs-security-private-ca/issues/3)) ([e3e90bb](https://www.github.com/googleapis/nodejs-security-private-ca/commit/e3e90bb60b1b46a948e47b99c5836d7e44f740b7)) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 7d2e44ccb96..de62e54f9cd 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "0.1.0", + "version": "1.0.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index b30b8a082b0..5b478592f40 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "0.1.0" + "@google-cloud/security-private-ca": "^1.0.0" }, "devDependencies": { "c8": "^7.1.0", From 1047b24d62735cdba7491eade2a92b3130632e08 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 26 Sep 2020 04:05:48 +0200 Subject: [PATCH 005/113] chore(deps): update dependency mocha to v8 (#5) --- packages/google-cloud-security-privateca/samples/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 5b478592f40..2f267a4f5b9 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -18,6 +18,6 @@ "devDependencies": { "c8": "^7.1.0", "chai": "^4.2.0", - "mocha": "^7.1.0" + "mocha": "^8.0.0" } } From aee4177877091bf8a40cea4156ad98aea7195afe Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Mon, 28 Sep 2020 10:38:15 -0700 Subject: [PATCH 006/113] chore: update issue tracker (#7) Co-authored-by: Justin Beckwith --- packages/google-cloud-security-privateca/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 60f63d59fcc..257a45a9e72 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -3,7 +3,7 @@ "name_pretty": "Google Cloud Certificate Authority", "product_documentation": "https://cloud.google.com/certificate-authority-service", "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", - "issue_tracker": "https://b.corp.google.com/components/402191#basic", + "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues", "release_level": "beta", "language": "nodejs", "repo": "googleapis/nodejs-security-private-ca", From 81be65ea66aca09b3d8ed24de5115f42653eccbb Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 30 Sep 2020 09:53:54 -0700 Subject: [PATCH 007/113] chore: update synthtool rules (#8) --- packages/google-cloud-security-privateca/synth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/synth.py b/packages/google-cloud-security-privateca/synth.py index fb699636f23..5f9fbac8127 100644 --- a/packages/google-cloud-security-privateca/synth.py +++ b/packages/google-cloud-security-privateca/synth.py @@ -30,7 +30,7 @@ version, bazel_target=f"//google/cloud/security/privateca/{version}:security-privateca-{version}-nodejs" ) - s.copy(library, excludes=[]) + s.copy(library, excludes=["package.json", "README.md"]) # Copy common templates common_templates = gcp.CommonTemplates() From 0ffca89cc169aa43e9e71bca9f51eb19fd25ea8c Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 7 Oct 2020 18:18:22 -0700 Subject: [PATCH 008/113] build: fix name (#12) --- packages/google-cloud-security-privateca/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 257a45a9e72..67a839f983a 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -1,6 +1,6 @@ { "name": "nodejs-security-private-ca", - "name_pretty": "Google Cloud Certificate Authority", + "name_pretty": "Certificate Authority Service", "product_documentation": "https://cloud.google.com/certificate-authority-service", "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues", From dcd63bd469c0b6b87666b60e33ee759ee282fed3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 12 Oct 2020 21:54:13 +0200 Subject: [PATCH 009/113] chore(deps): update dependency webpack-cli to v4 (#15) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | major | [`^3.3.12` -> `^4.0.0`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.12/4.0.0) | --- ### Release Notes
webpack/webpack-cli ### [`v4.0.0`](https://togithub.com/webpack/webpack-cli/blob/master/CHANGELOG.md#​400-httpsgithubcomwebpackwebpack-clicomparewebpack-cli400-rc1webpack-cli400-2020-10-10) [Compare Source](https://togithub.com/webpack/webpack-cli/compare/v3.3.12...webpack-cli@4.0.0) ##### Bug Fixes - add compilation lifecycle in watch instance ([#​1903](https://togithub.com/webpack/webpack-cli/issues/1903)) ([02b6d21](https://togithub.com/webpack/webpack-cli/commit/02b6d21eaa20166a7ed37816de716b8fc22b756a)) - cleanup `package-utils` package ([#​1822](https://togithub.com/webpack/webpack-cli/issues/1822)) ([fd5b92b](https://togithub.com/webpack/webpack-cli/commit/fd5b92b3cd40361daec5bf4486e455a41f4c9738)) - cli-executer supplies args further up ([#​1904](https://togithub.com/webpack/webpack-cli/issues/1904)) ([097564a](https://togithub.com/webpack/webpack-cli/commit/097564a851b36b63e0a6bf88144997ef65aa057a)) - exit code for validation errors ([59f6303](https://togithub.com/webpack/webpack-cli/commit/59f63037fcbdbb8934b578b9adf5725bc4ae1235)) - exit process in case of schema errors ([71e89b4](https://togithub.com/webpack/webpack-cli/commit/71e89b4092d953ea587cc4f606451ab78cbcdb93)) ##### Features - assign config paths in build dependencies in cache config ([#​1900](https://togithub.com/webpack/webpack-cli/issues/1900)) ([7e90f11](https://togithub.com/webpack/webpack-cli/commit/7e90f110b119f36ef9def4f66cf4e17ccf1438cd))
--- ### Renovate 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index de62e54f9cd..d3645d86478 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -58,7 +58,7 @@ "ts-loader": "^8.0.3", "typescript": "^3.9.7", "webpack": "^4.44.1", - "webpack-cli": "^3.3.12" + "webpack-cli": "^4.0.0" }, "engines": { "node": ">=10.0.0" From f62aeba9baf8899fe121c1618e295d1bf0a7d067 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Oct 2020 23:04:14 +0200 Subject: [PATCH 010/113] chore(deps): update dependency webpack to v5 (#14) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack](https://togithub.com/webpack/webpack) | devDependencies | major | [`^4.44.1` -> `^5.0.0`](https://renovatebot.com/diffs/npm/webpack/4.44.2/5.1.0) | --- ### Release Notes
webpack/webpack ### [`v5.1.0`](https://togithub.com/webpack/webpack/releases/v5.1.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v5.0.0...v5.1.0) ### Features - expose `webpack` property from `Compiler` - expose `cleverMerge`, `EntryOptionPlugin`, `DynamicEntryPlugin` ### Bugfixes - missing `require("..").xxx` in try-catch produces a warning instead of an error now - handle reexports in concatenated modules correctly when they are side-effect-free - fix incorrect deprecation message for ModuleTemplate.hooks.hash ### [`v5.0.0`](https://togithub.com/webpack/webpack/releases/v5.0.0) [Compare Source](https://togithub.com/webpack/webpack/compare/v4.44.2...v5.0.0) [Announcement and changelog](https://webpack.js.org/blog/2020-10-10-webpack-5-release/)
--- ### Renovate 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index d3645d86478..1bd41acebc0 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -57,7 +57,7 @@ "sinon": "^9.0.3", "ts-loader": "^8.0.3", "typescript": "^3.9.7", - "webpack": "^4.44.1", + "webpack": "^5.0.0", "webpack-cli": "^4.0.0" }, "engines": { From 4b2b535ed41d0eb1b08eea6d9887fd7ae7ba6883 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Fri, 6 Nov 2020 17:22:05 -0800 Subject: [PATCH 011/113] fix: do not modify options object, use defaultScopes (#28) Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1. --- .../google-cloud-security-privateca/.jsdoc.js | 2 +- .../CODE_OF_CONDUCT.md | 123 +- .../google-cloud-security-privateca/README.md | 2 +- .../linkinator.config.json | 6 +- .../package.json | 2 +- .../privateca/v1beta1/resources.proto | 42 +- .../security/privateca/v1beta1/service.proto | 195 +-- .../protos/protos.d.ts | 507 +----- .../protos/protos.js | 1447 +++-------------- .../protos/protos.json | 168 +- .../samples/README.md | 2 +- .../src/index.ts | 1 + .../certificate_authority_service_client.ts | 1418 +++++----------- ...icate_authority_service_client_config.json | 20 - .../synth.metadata | 85 +- .../google-cloud-security-privateca/synth.py | 4 +- .../system-test/fixtures/sample/src/index.ts | 13 +- .../system-test/install.ts | 18 +- ...c_certificate_authority_service_v1beta1.ts | 839 ---------- 19 files changed, 867 insertions(+), 4027 deletions(-) diff --git a/packages/google-cloud-security-privateca/.jsdoc.js b/packages/google-cloud-security-privateca/.jsdoc.js index ddb002f575e..36f47c397e9 100644 --- a/packages/google-cloud-security-privateca/.jsdoc.js +++ b/packages/google-cloud-security-privateca/.jsdoc.js @@ -43,7 +43,7 @@ module.exports = { copyright: 'Copyright 2020 Google LLC', includeDate: false, sourceFiles: false, - systemName: 'privateca', + systemName: '@google-cloud/security-private-ca', theme: 'lumen', default: { outputSourceFiles: false diff --git a/packages/google-cloud-security-privateca/CODE_OF_CONDUCT.md b/packages/google-cloud-security-privateca/CODE_OF_CONDUCT.md index 46b2a08ea6d..2add2547a81 100644 --- a/packages/google-cloud-security-privateca/CODE_OF_CONDUCT.md +++ b/packages/google-cloud-security-privateca/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-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 7e24fd99779..b66d4723b82 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -5,7 +5,7 @@ # [Google Cloud Certificate Authority: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) [![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/privateca.svg)](https://www.npmjs.org/package/privateca) +[![npm version](https://img.shields.io/npm/v/@google-cloud/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) diff --git a/packages/google-cloud-security-privateca/linkinator.config.json b/packages/google-cloud-security-privateca/linkinator.config.json index fa63d3d90ad..8a73a453453 100644 --- a/packages/google-cloud-security-privateca/linkinator.config.json +++ b/packages/google-cloud-security-privateca/linkinator.config.json @@ -4,11 +4,7 @@ "https://codecov.io/gh/googleapis/", "www.googleapis.com", "img.shields.io", - "https://github.com/googleapis/nodejs-security-private-ca/blob/master/CHANGELOG.md", - "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", - "https://www.npmjs.org/package/privateca", - "https://github.com/googleapis/nodejs-security-private-ca/tree/master/samples", - "https://github.com/googleapis/nodejs-security-private-ca/blob/master/samples/quickstart.js" + "https://googleapis.dev/nodejs/security-private-ca/latest/index.html" ], "silent": true, "concurrency": 10 diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 1bd41acebc0..c634bf363e1 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto index 44b37d2dadb..937e931d663 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto @@ -29,6 +29,8 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/security/privat option java_multiple_files = true; option java_outer_classname = "PrivateCaResourcesProto"; option java_package = "com.google.cloud.security.privateca.v1beta1"; +option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1beta1"; +option ruby_package = "Google::Cloud::Security::PrivateCA::V1beta1"; // A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] represents an individual Certificate Authority. // A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1beta1.Certificate]. @@ -170,7 +172,8 @@ message CertificateAuthority { message KeyVersionSpec { oneof KeyVersion { // Required. The resource name for an existing Cloud KMS CryptoKeyVersion in the - // format`projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + // format + // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. // This option enables full flexibility in the key's capabilities and // properties. string cloud_kms_key_version = 1 [(google.api.field_behavior) = REQUIRED]; @@ -231,20 +234,32 @@ message CertificateAuthority { // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value // `ASYMMETRIC_SIGN`. These values correspond to the - // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKey.CryptoKeyVersion.CryptoKeyVersionAlgorithm]. - // values. + // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + // values. For RSA signing algorithms, the PSS algorithms should be preferred, + // use PKCS1 algorithms if required for compatibility. For further + // recommandations, see + // https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. enum SignHashAlgorithm { // Not specified. SIGN_HASH_ALGORITHM_UNSPECIFIED = 0; // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 - RSA_PSS_2048_SHA_256 = 1; + RSA_PSS_2048_SHA256 = 1; // maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 - RSA_PSS_3072_SHA_256 = 2; + RSA_PSS_3072_SHA256 = 2; // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 - RSA_PSS_4096_SHA_256 = 3; + RSA_PSS_4096_SHA256 = 3; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 + RSA_PKCS1_2048_SHA256 = 6; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 + RSA_PKCS1_3072_SHA256 = 7; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 + RSA_PKCS1_4096_SHA256 = 8; // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 EC_P256_SHA256 = 4; @@ -437,11 +452,14 @@ message Certificate { CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE]; } - // Required. The desired lifetime of a certificate. Used to create the + // Required. Immutable. The desired lifetime of a certificate. Used to create the // "not_before_time" and "not_after_time" fields inside an X.509 // certificate. Note that the lifetime may be truncated if it would extend // past the life of any certificate authority in the issuing chain. - google.protobuf.Duration lifetime = 4 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration lifetime = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; // Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. This // [Certificate][google.cloud.security.privateca.v1beta1.Certificate] is considered revoked if and only if this field is present. @@ -525,7 +543,7 @@ message ReusableConfigValues { CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Describes the X.509 certificate policy object identifiers, per - // https://tools.ietf.org/html/rfc5280#section-4.2.1.4rfc5280 + // https://tools.ietf.org/html/rfc5280#section-4.2.1.4. repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL]; // Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses @@ -845,8 +863,10 @@ message SubjectAltNames { } // A [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] has been revoked, -// and the reason for revocation. These are standard revocation reasons from RFC -// 5280. +// and the reason for revocation. These correspond to standard revocation +// reasons from RFC 5280. Note that the enum labels and values in this +// definition are not the same ASN.1 values defined in RFC 5280. These values +// will be translated to the correct ASN.1 values when a CRL is created. enum RevocationReason { // Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1beta1.Certificate] // has been revoked, but that a reason has not been recorded. diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto index cda5fde4587..3cc010de7ec 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/security/privateca/v1beta1/resources.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -31,6 +32,8 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/security/privat option java_multiple_files = true; option java_outer_classname = "PrivateCaProto"; option java_package = "com.google.cloud.security.privateca.v1beta1"; +option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1beta1"; +option ruby_package = "Google::Cloud::Security::PrivateCA::V1beta1"; // [Certificate Authority Service][google.cloud.security.privateca.v1beta1.CertificateAuthorityService] manages private // certificate authorities and issued certificates. @@ -73,7 +76,8 @@ service CertificateAuthorityService { option (google.api.method_signature) = "name"; } - // Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. + // Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the + // [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field. rpc UpdateCertificate(UpdateCertificateRequest) returns (Certificate) { option (google.api.http) = { patch: "/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}" @@ -208,20 +212,6 @@ service CertificateAuthorityService { }; } - // Create a new [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] in a given Project, Location - // for a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority]. - rpc CreateCertificateRevocationList(CreateCertificateRevocationListRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists" - body: "certificate_revocation_list" - }; - option (google.api.method_signature) = "parent,certificate_revocation_list,certificate_revocation_list_id"; - option (google.longrunning.operation_info) = { - response_type: "CertificateRevocationList" - metadata_type: "OperationMetadata" - }; - } - // Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList]. rpc GetCertificateRevocationList(GetCertificateRevocationListRequest) returns (CertificateRevocationList) { option (google.api.http) = { @@ -251,31 +241,6 @@ service CertificateAuthorityService { }; } - // Create a new [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in a given Project and Location. - rpc CreateReusableConfig(CreateReusableConfigRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs" - body: "reusable_config" - }; - option (google.api.method_signature) = "parent,reusable_config,reusable_config_id"; - option (google.longrunning.operation_info) = { - response_type: "ReusableConfig" - metadata_type: "OperationMetadata" - }; - } - - // DeleteReusableConfig deletes a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. - rpc DeleteReusableConfig(DeleteReusableConfigRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.security.privateca.v1beta1.OperationMetadata" - }; - } - // Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. rpc GetReusableConfig(GetReusableConfigRequest) returns (ReusableConfig) { option (google.api.http) = { @@ -291,19 +256,6 @@ service CertificateAuthorityService { }; option (google.api.method_signature) = "parent"; } - - // Update a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig]. - rpc UpdateReusableConfig(UpdateReusableConfigRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{reusable_config.name=projects/*/locations/*/reusableConfigs/*}" - body: "reusable_config" - }; - option (google.api.method_signature) = "reusable_config,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "ReusableConfig" - metadata_type: "OperationMetadata" - }; - } } // Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate]. @@ -319,7 +271,7 @@ message CreateCertificateRequest { ]; // Optional. It must be unique within a location and match the regular - // expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + // expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a // [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], // but is optional and its value is ignored otherwise. string certificate_id = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -379,10 +331,14 @@ message ListCertificatesRequest { // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token]. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Only include resources that match the filter in the response. + // Optional. Only include resources that match the filter in the response. For details + // on supported filters and syntax, see [Certificates Filtering + // documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specify how the results should be sorted. + // Optional. Specify how the results should be sorted. For details on supported fields + // and syntax, see [Certificates Sorting + // documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } @@ -505,7 +461,7 @@ message CreateCertificateAuthorityRequest { ]; // Required. It must be unique within a location and match the regular - // expression `[a-zA-Z0-9-]{1,63}` + // expression `[a-zA-Z0-9_-]{1,63}` string certificate_authority_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values. @@ -743,42 +699,6 @@ message UpdateCertificateAuthorityRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for -// [CertificateAuthorityService.CreateCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationList]. -message CreateCertificateRevocationListRequest { - // Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] - // associated with the [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format - // `projects/*/locations/*/certificateAuthorities/*`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "privateca.googleapis.com/CertificateAuthority" - } - ]; - - // Required. It must be unique within a location and match the regular expression - // `[a-zA-Z0-9-]{1,63}` - string certificate_revocation_list_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with initial field values. - CertificateRevocationList certificate_revocation_list = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An ID to identify requests. Specify a unique request ID so that if you must - // retry your request, the server will know to ignore the request if it has - // already been completed. The server will guarantee that for at least 60 - // minutes since the first request. - // - // For example, consider a situation where you make an initial request and t - // he request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - // Request message for // [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList]. message GetCertificateRevocationListRequest { @@ -864,70 +784,6 @@ message UpdateCertificateRevocationListRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for -// [CertificateAuthorityService.CreateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfig]. -message CreateReusableConfigRequest { - // Required. The resource name of the location associated with the - // [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format - // `projects/*/locations/*`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. It must be unique within a location and match the regular - // expression `[a-zA-Z0-9-]{1,63}` - string reusable_config_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. A [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with initial field values. - ReusableConfig reusable_config = 3 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An ID to identify requests. Specify a unique request ID so that if you must - // retry your request, the server will know to ignore the request if it has - // already been completed. The server will guarantee that for at least 60 - // minutes since the first request. - // - // For example, consider a situation where you make an initial request and t - // he request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [CertificateAuthorityService.DeleteReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfig]. -message DeleteReusableConfigRequest { - // Required. The resource name for this [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format - // `projects/*/locations/*/reusableConfigs/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "privateca.googleapis.com/ReusableConfig" - } - ]; - - // Optional. An ID to identify requests. Specify a unique request ID so that if you must - // retry your request, the server will know to ignore the request if it has - // already been completed. The server will guarantee that for at least 60 - // minutes since the first request. - // - // For example, consider a situation where you make an initial request and t - // he request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; -} - // Request message for // [CertificateAuthorityService.GetReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig]. message GetReusableConfigRequest { @@ -987,31 +843,6 @@ message ListReusableConfigsResponse { repeated string unreachable = 3; } -// Request message for -// [CertificateAuthorityService.UpdateReusableConfig][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfig]. -message UpdateReusableConfigRequest { - // Required. [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] with updated values. - ReusableConfig reusable_config = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. A list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An ID to identify requests. Specify a unique request ID so that if you must - // retry your request, the server will know to ignore the request if it has - // already been completed. The server will guarantee that for at least 60 - // minutes since the first request. - // - // For example, consider a situation where you make an initial request and t - // he request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. - // - // The request ID must be a valid UUID with the exception that zero UUID is - // not supported (00000000-0000-0000-0000-000000000000). - string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; -} - // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index 2c32e0b7391..a0b4455a8e9 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -978,9 +978,12 @@ export namespace google { /** SignHashAlgorithm enum. */ enum SignHashAlgorithm { SIGN_HASH_ALGORITHM_UNSPECIFIED = 0, - RSA_PSS_2048_SHA_256 = 1, - RSA_PSS_3072_SHA_256 = 2, - RSA_PSS_4096_SHA_256 = 3, + RSA_PSS_2048_SHA256 = 1, + RSA_PSS_3072_SHA256 = 2, + RSA_PSS_4096_SHA256 = 3, + RSA_PKCS1_2048_SHA256 = 6, + RSA_PKCS1_3072_SHA256 = 7, + RSA_PKCS1_4096_SHA256 = 8, EC_P256_SHA256 = 4, EC_P384_SHA384 = 5 } @@ -3904,20 +3907,6 @@ export namespace google { */ public updateCertificateAuthority(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest): Promise; - /** - * Calls CreateCertificateRevocationList. - * @param request CreateCertificateRevocationListRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationListCallback): void; - - /** - * Calls CreateCertificateRevocationList. - * @param request CreateCertificateRevocationListRequest message or plain object - * @returns Promise - */ - public createCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest): Promise; - /** * Calls GetCertificateRevocationList. * @param request GetCertificateRevocationListRequest message or plain object @@ -3960,34 +3949,6 @@ export namespace google { */ public updateCertificateRevocationList(request: google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest): Promise; - /** - * Calls CreateReusableConfig. - * @param request CreateReusableConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createReusableConfig(request: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfigCallback): void; - - /** - * Calls CreateReusableConfig. - * @param request CreateReusableConfigRequest message or plain object - * @returns Promise - */ - public createReusableConfig(request: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest): Promise; - - /** - * Calls DeleteReusableConfig. - * @param request DeleteReusableConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteReusableConfig(request: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfigCallback): void; - - /** - * Calls DeleteReusableConfig. - * @param request DeleteReusableConfigRequest message or plain object - * @returns Promise - */ - public deleteReusableConfig(request: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest): Promise; - /** * Calls GetReusableConfig. * @param request GetReusableConfigRequest message or plain object @@ -4015,20 +3976,6 @@ export namespace google { * @returns Promise */ public listReusableConfigs(request: google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest): Promise; - - /** - * Calls UpdateReusableConfig. - * @param request UpdateReusableConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateReusableConfig(request: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, callback: google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfigCallback): void; - - /** - * Calls UpdateReusableConfig. - * @param request UpdateReusableConfigRequest message or plain object - * @returns Promise - */ - public updateReusableConfig(request: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest): Promise; } namespace CertificateAuthorityService { @@ -4138,13 +4085,6 @@ export namespace google { */ type UpdateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateRevocationList}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateRevocationList}. * @param error Error, if any @@ -4166,20 +4106,6 @@ export namespace google { */ type UpdateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createReusableConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateReusableConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#deleteReusableConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteReusableConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - /** * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getReusableConfig}. * @param error Error, if any @@ -4193,13 +4119,6 @@ export namespace google { * @param [response] ListReusableConfigsResponse */ type ListReusableConfigsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse) => void; - - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateReusableConfig}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateReusableConfigCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Properties of a CreateCertificateRequest. */ @@ -6008,114 +5927,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a CreateCertificateRevocationListRequest. */ - interface ICreateCertificateRevocationListRequest { - - /** CreateCertificateRevocationListRequest parent */ - parent?: (string|null); - - /** CreateCertificateRevocationListRequest certificateRevocationListId */ - certificateRevocationListId?: (string|null); - - /** CreateCertificateRevocationListRequest certificateRevocationList */ - certificateRevocationList?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null); - - /** CreateCertificateRevocationListRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateCertificateRevocationListRequest. */ - class CreateCertificateRevocationListRequest implements ICreateCertificateRevocationListRequest { - - /** - * Constructs a new CreateCertificateRevocationListRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest); - - /** CreateCertificateRevocationListRequest parent. */ - public parent: string; - - /** CreateCertificateRevocationListRequest certificateRevocationListId. */ - public certificateRevocationListId: string; - - /** CreateCertificateRevocationListRequest certificateRevocationList. */ - public certificateRevocationList?: (google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null); - - /** CreateCertificateRevocationListRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateCertificateRevocationListRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateCertificateRevocationListRequest instance - */ - public static create(properties?: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; - - /** - * Encodes the specified CreateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. - * @param message CreateCertificateRevocationListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. - * @param message CreateCertificateRevocationListRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateCertificateRevocationListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; - - /** - * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateCertificateRevocationListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; - - /** - * Verifies a CreateCertificateRevocationListRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateCertificateRevocationListRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest; - - /** - * Creates a plain object from a CreateCertificateRevocationListRequest message. Also converts values to other types if specified. - * @param message CreateCertificateRevocationListRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateCertificateRevocationListRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a GetCertificateRevocationListRequest. */ interface IGetCertificateRevocationListRequest { @@ -6524,210 +6335,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of a CreateReusableConfigRequest. */ - interface ICreateReusableConfigRequest { - - /** CreateReusableConfigRequest parent */ - parent?: (string|null); - - /** CreateReusableConfigRequest reusableConfigId */ - reusableConfigId?: (string|null); - - /** CreateReusableConfigRequest reusableConfig */ - reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); - - /** CreateReusableConfigRequest requestId */ - requestId?: (string|null); - } - - /** Represents a CreateReusableConfigRequest. */ - class CreateReusableConfigRequest implements ICreateReusableConfigRequest { - - /** - * Constructs a new CreateReusableConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest); - - /** CreateReusableConfigRequest parent. */ - public parent: string; - - /** CreateReusableConfigRequest reusableConfigId. */ - public reusableConfigId: string; - - /** CreateReusableConfigRequest reusableConfig. */ - public reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); - - /** CreateReusableConfigRequest requestId. */ - public requestId: string; - - /** - * Creates a new CreateReusableConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateReusableConfigRequest instance - */ - public static create(properties?: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; - - /** - * Encodes the specified CreateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. - * @param message CreateReusableConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. - * @param message CreateReusableConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateReusableConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; - - /** - * Decodes a CreateReusableConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; - - /** - * Verifies a CreateReusableConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateReusableConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest; - - /** - * Creates a plain object from a CreateReusableConfigRequest message. Also converts values to other types if specified. - * @param message CreateReusableConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateReusableConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DeleteReusableConfigRequest. */ - interface IDeleteReusableConfigRequest { - - /** DeleteReusableConfigRequest name */ - name?: (string|null); - - /** DeleteReusableConfigRequest requestId */ - requestId?: (string|null); - } - - /** Represents a DeleteReusableConfigRequest. */ - class DeleteReusableConfigRequest implements IDeleteReusableConfigRequest { - - /** - * Constructs a new DeleteReusableConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest); - - /** DeleteReusableConfigRequest name. */ - public name: string; - - /** DeleteReusableConfigRequest requestId. */ - public requestId: string; - - /** - * Creates a new DeleteReusableConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteReusableConfigRequest instance - */ - public static create(properties?: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; - - /** - * Encodes the specified DeleteReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. - * @param message DeleteReusableConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. - * @param message DeleteReusableConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; - - /** - * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; - - /** - * Verifies a DeleteReusableConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteReusableConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteReusableConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest; - - /** - * Creates a plain object from a DeleteReusableConfigRequest message. Also converts values to other types if specified. - * @param message DeleteReusableConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteReusableConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of a GetReusableConfigRequest. */ interface IGetReusableConfigRequest { @@ -7034,108 +6641,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Properties of an UpdateReusableConfigRequest. */ - interface IUpdateReusableConfigRequest { - - /** UpdateReusableConfigRequest reusableConfig */ - reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); - - /** UpdateReusableConfigRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateReusableConfigRequest requestId */ - requestId?: (string|null); - } - - /** Represents an UpdateReusableConfigRequest. */ - class UpdateReusableConfigRequest implements IUpdateReusableConfigRequest { - - /** - * Constructs a new UpdateReusableConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest); - - /** UpdateReusableConfigRequest reusableConfig. */ - public reusableConfig?: (google.cloud.security.privateca.v1beta1.IReusableConfig|null); - - /** UpdateReusableConfigRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** UpdateReusableConfigRequest requestId. */ - public requestId: string; - - /** - * Creates a new UpdateReusableConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateReusableConfigRequest instance - */ - public static create(properties?: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; - - /** - * Encodes the specified UpdateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. - * @param message UpdateReusableConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. - * @param message UpdateReusableConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; - - /** - * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; - - /** - * Verifies an UpdateReusableConfigRequest message. - * @param message Plain 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 UpdateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateReusableConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest; - - /** - * Creates a plain object from an UpdateReusableConfigRequest message. Also converts values to other types if specified. - * @param message UpdateReusableConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateReusableConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - /** Properties of an OperationMetadata. */ interface IOperationMetadata { diff --git a/packages/google-cloud-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index f47680ac9d3..abd84ff1e5c 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -28,7 +28,7 @@ var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace - var $root = $protobuf.roots.privateca_protos || ($protobuf.roots.privateca_protos = {}); + var $root = $protobuf.roots._google_cloud_security_private_ca_protos || ($protobuf.roots._google_cloud_security_private_ca_protos = {}); $root.google = (function() { @@ -2611,6 +2611,9 @@ case 1: case 2: case 3: + case 6: + case 7: + case 8: case 4: case 5: break; @@ -2638,18 +2641,30 @@ case 0: message.algorithm = 0; break; - case "RSA_PSS_2048_SHA_256": + case "RSA_PSS_2048_SHA256": case 1: message.algorithm = 1; break; - case "RSA_PSS_3072_SHA_256": + case "RSA_PSS_3072_SHA256": case 2: message.algorithm = 2; break; - case "RSA_PSS_4096_SHA_256": + case "RSA_PSS_4096_SHA256": case 3: message.algorithm = 3; break; + case "RSA_PKCS1_2048_SHA256": + case 6: + message.algorithm = 6; + break; + case "RSA_PKCS1_3072_SHA256": + case 7: + message.algorithm = 7; + break; + case "RSA_PKCS1_4096_SHA256": + case 8: + message.algorithm = 8; + break; case "EC_P256_SHA256": case 4: message.algorithm = 4; @@ -2759,18 +2774,24 @@ * @name google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm * @enum {number} * @property {number} SIGN_HASH_ALGORITHM_UNSPECIFIED=0 SIGN_HASH_ALGORITHM_UNSPECIFIED value - * @property {number} RSA_PSS_2048_SHA_256=1 RSA_PSS_2048_SHA_256 value - * @property {number} RSA_PSS_3072_SHA_256=2 RSA_PSS_3072_SHA_256 value - * @property {number} RSA_PSS_4096_SHA_256=3 RSA_PSS_4096_SHA_256 value + * @property {number} RSA_PSS_2048_SHA256=1 RSA_PSS_2048_SHA256 value + * @property {number} RSA_PSS_3072_SHA256=2 RSA_PSS_3072_SHA256 value + * @property {number} RSA_PSS_4096_SHA256=3 RSA_PSS_4096_SHA256 value + * @property {number} RSA_PKCS1_2048_SHA256=6 RSA_PKCS1_2048_SHA256 value + * @property {number} RSA_PKCS1_3072_SHA256=7 RSA_PKCS1_3072_SHA256 value + * @property {number} RSA_PKCS1_4096_SHA256=8 RSA_PKCS1_4096_SHA256 value * @property {number} EC_P256_SHA256=4 EC_P256_SHA256 value * @property {number} EC_P384_SHA384=5 EC_P384_SHA384 value */ CertificateAuthority.SignHashAlgorithm = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SIGN_HASH_ALGORITHM_UNSPECIFIED"] = 0; - values[valuesById[1] = "RSA_PSS_2048_SHA_256"] = 1; - values[valuesById[2] = "RSA_PSS_3072_SHA_256"] = 2; - values[valuesById[3] = "RSA_PSS_4096_SHA_256"] = 3; + values[valuesById[1] = "RSA_PSS_2048_SHA256"] = 1; + values[valuesById[2] = "RSA_PSS_3072_SHA256"] = 2; + values[valuesById[3] = "RSA_PSS_4096_SHA256"] = 3; + values[valuesById[6] = "RSA_PKCS1_2048_SHA256"] = 6; + values[valuesById[7] = "RSA_PKCS1_3072_SHA256"] = 7; + values[valuesById[8] = "RSA_PKCS1_4096_SHA256"] = 8; values[valuesById[4] = "EC_P256_SHA256"] = 4; values[valuesById[5] = "EC_P384_SHA384"] = 5; return values; @@ -10401,39 +10422,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateRevocationList}. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @typedef CreateCertificateRevocationListCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateCertificateRevocationList. - * @function createCertificateRevocationList - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} request CreateCertificateRevocationListRequest message or plain object - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateRevocationListCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CertificateAuthorityService.prototype.createCertificateRevocationList = function createCertificateRevocationList(request, callback) { - return this.rpcCall(createCertificateRevocationList, $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateCertificateRevocationList" }); - - /** - * Calls CreateCertificateRevocationList. - * @function createCertificateRevocationList - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} request CreateCertificateRevocationListRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateRevocationList}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService @@ -10533,72 +10521,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createReusableConfig}. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @typedef CreateReusableConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateReusableConfig. - * @function createReusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} request CreateReusableConfigRequest message or plain object - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateReusableConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CertificateAuthorityService.prototype.createReusableConfig = function createReusableConfig(request, callback) { - return this.rpcCall(createReusableConfig, $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateReusableConfig" }); - - /** - * Calls CreateReusableConfig. - * @function createReusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} request CreateReusableConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#deleteReusableConfig}. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @typedef DeleteReusableConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteReusableConfig. - * @function deleteReusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} request DeleteReusableConfigRequest message or plain object - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DeleteReusableConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CertificateAuthorityService.prototype.deleteReusableConfig = function deleteReusableConfig(request, callback) { - return this.rpcCall(deleteReusableConfig, $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteReusableConfig" }); - - /** - * Calls DeleteReusableConfig. - * @function deleteReusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} request DeleteReusableConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - /** * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getReusableConfig}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService @@ -10665,39 +10587,6 @@ * @variation 2 */ - /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateReusableConfig}. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @typedef UpdateReusableConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateReusableConfig. - * @function updateReusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} request UpdateReusableConfigRequest message or plain object - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateReusableConfigCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(CertificateAuthorityService.prototype.updateReusableConfig = function updateReusableConfig(request, callback) { - return this.rpcCall(updateReusableConfig, $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateReusableConfig" }); - - /** - * Calls UpdateReusableConfig. - * @function updateReusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService - * @instance - * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} request UpdateReusableConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - return CertificateAuthorityService; })(); @@ -14922,27 +14811,24 @@ return UpdateCertificateAuthorityRequest; })(); - v1beta1.CreateCertificateRevocationListRequest = (function() { + v1beta1.GetCertificateRevocationListRequest = (function() { /** - * Properties of a CreateCertificateRevocationListRequest. + * Properties of a GetCertificateRevocationListRequest. * @memberof google.cloud.security.privateca.v1beta1 - * @interface ICreateCertificateRevocationListRequest - * @property {string|null} [parent] CreateCertificateRevocationListRequest parent - * @property {string|null} [certificateRevocationListId] CreateCertificateRevocationListRequest certificateRevocationListId - * @property {google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null} [certificateRevocationList] CreateCertificateRevocationListRequest certificateRevocationList - * @property {string|null} [requestId] CreateCertificateRevocationListRequest requestId + * @interface IGetCertificateRevocationListRequest + * @property {string|null} [name] GetCertificateRevocationListRequest name */ /** - * Constructs a new CreateCertificateRevocationListRequest. + * Constructs a new GetCertificateRevocationListRequest. * @memberof google.cloud.security.privateca.v1beta1 - * @classdesc Represents a CreateCertificateRevocationListRequest. - * @implements ICreateCertificateRevocationListRequest + * @classdesc Represents a GetCertificateRevocationListRequest. + * @implements IGetCertificateRevocationListRequest * @constructor - * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest=} [properties] Properties to set + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest=} [properties] Properties to set */ - function CreateCertificateRevocationListRequest(properties) { + function GetCertificateRevocationListRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14950,114 +14836,75 @@ } /** - * CreateCertificateRevocationListRequest parent. - * @member {string} parent - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest - * @instance - */ - CreateCertificateRevocationListRequest.prototype.parent = ""; - - /** - * CreateCertificateRevocationListRequest certificateRevocationListId. - * @member {string} certificateRevocationListId - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest - * @instance - */ - CreateCertificateRevocationListRequest.prototype.certificateRevocationListId = ""; - - /** - * CreateCertificateRevocationListRequest certificateRevocationList. - * @member {google.cloud.security.privateca.v1beta1.ICertificateRevocationList|null|undefined} certificateRevocationList - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest - * @instance - */ - CreateCertificateRevocationListRequest.prototype.certificateRevocationList = null; - - /** - * CreateCertificateRevocationListRequest requestId. - * @member {string} requestId - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * GetCertificateRevocationListRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @instance */ - CreateCertificateRevocationListRequest.prototype.requestId = ""; + GetCertificateRevocationListRequest.prototype.name = ""; /** - * Creates a new CreateCertificateRevocationListRequest instance using the specified properties. + * Creates a new GetCertificateRevocationListRequest instance using the specified properties. * @function create - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest instance + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest instance */ - CreateCertificateRevocationListRequest.create = function create(properties) { - return new CreateCertificateRevocationListRequest(properties); + GetCertificateRevocationListRequest.create = function create(properties) { + return new GetCertificateRevocationListRequest(properties); }; /** - * Encodes the specified CreateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. + * Encodes the specified GetCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} message CreateCertificateRevocationListRequest message or plain object to encode + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCertificateRevocationListRequest.encode = function encode(message, writer) { + GetCertificateRevocationListRequest.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.certificateRevocationListId != null && Object.hasOwnProperty.call(message, "certificateRevocationListId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateRevocationListId); - if (message.certificateRevocationList != null && Object.hasOwnProperty.call(message, "certificateRevocationList")) - $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.encode(message.certificateRevocationList, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.verify|verify} messages. + * Encodes the specified GetCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest} message CreateCertificateRevocationListRequest message or plain object to encode + * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer. + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateCertificateRevocationListRequest.decode = function decode(reader, length) { + GetCertificateRevocationListRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); - break; - case 2: - message.certificateRevocationListId = reader.string(); - break; - case 3: - message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -15068,137 +14915,111 @@ }; /** - * Decodes a CreateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { + GetCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateCertificateRevocationListRequest message. + * Verifies a GetCertificateRevocationListRequest message. * @function verify - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateCertificateRevocationListRequest.verify = function verify(message) { + GetCertificateRevocationListRequest.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.certificateRevocationListId != null && message.hasOwnProperty("certificateRevocationListId")) - if (!$util.isString(message.certificateRevocationListId)) - return "certificateRevocationListId: string expected"; - if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify(message.certificateRevocationList); - if (error) - return "certificateRevocationList." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} CreateCertificateRevocationListRequest + * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest */ - CreateCertificateRevocationListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest) + GetCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) return object; - var message = new $root.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.certificateRevocationListId != null) - message.certificateRevocationListId = String(object.certificateRevocationListId); - if (object.certificateRevocationList != null) { - if (typeof object.certificateRevocationList !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest.certificateRevocationList: object expected"); - message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.fromObject(object.certificateRevocationList); - } - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreateCertificateRevocationListRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetCertificateRevocationListRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest} message CreateCertificateRevocationListRequest + * @param {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} message GetCertificateRevocationListRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateCertificateRevocationListRequest.toObject = function toObject(message, options) { + GetCertificateRevocationListRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.certificateRevocationListId = ""; - object.certificateRevocationList = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.certificateRevocationListId != null && message.hasOwnProperty("certificateRevocationListId")) - object.certificateRevocationListId = message.certificateRevocationListId; - if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) - object.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.toObject(message.certificateRevocationList, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreateCertificateRevocationListRequest to JSON. + * Converts this GetCertificateRevocationListRequest to JSON. * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest * @instance * @returns {Object.} JSON object */ - CreateCertificateRevocationListRequest.prototype.toJSON = function toJSON() { + GetCertificateRevocationListRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateCertificateRevocationListRequest; + return GetCertificateRevocationListRequest; })(); - v1beta1.GetCertificateRevocationListRequest = (function() { + v1beta1.ListCertificateRevocationListsRequest = (function() { /** - * Properties of a GetCertificateRevocationListRequest. + * Properties of a ListCertificateRevocationListsRequest. * @memberof google.cloud.security.privateca.v1beta1 - * @interface IGetCertificateRevocationListRequest - * @property {string|null} [name] GetCertificateRevocationListRequest name + * @interface IListCertificateRevocationListsRequest + * @property {string|null} [parent] ListCertificateRevocationListsRequest parent + * @property {number|null} [pageSize] ListCertificateRevocationListsRequest pageSize + * @property {string|null} [pageToken] ListCertificateRevocationListsRequest pageToken + * @property {string|null} [filter] ListCertificateRevocationListsRequest filter + * @property {string|null} [orderBy] ListCertificateRevocationListsRequest orderBy */ /** - * Constructs a new GetCertificateRevocationListRequest. + * Constructs a new ListCertificateRevocationListsRequest. * @memberof google.cloud.security.privateca.v1beta1 - * @classdesc Represents a GetCertificateRevocationListRequest. - * @implements IGetCertificateRevocationListRequest + * @classdesc Represents a ListCertificateRevocationListsRequest. + * @implements IListCertificateRevocationListsRequest * @constructor - * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest=} [properties] Properties to set + * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest=} [properties] Properties to set */ - function GetCertificateRevocationListRequest(properties) { + function ListCertificateRevocationListsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15206,203 +15027,12 @@ } /** - * GetCertificateRevocationListRequest name. - * @member {string} name - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * ListCertificateRevocationListsRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest * @instance */ - GetCertificateRevocationListRequest.prototype.name = ""; - - /** - * Creates a new GetCertificateRevocationListRequest instance using the specified properties. - * @function create - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest instance - */ - GetCertificateRevocationListRequest.create = function create(properties) { - return new GetCertificateRevocationListRequest(properties); - }; - - /** - * Encodes the specified GetCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCertificateRevocationListRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); - 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 GetCertificateRevocationListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetCertificateRevocationListRequest message. - * @function verify - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest - */ - GetCertificateRevocationListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest) - return object; - var message = new $root.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetCertificateRevocationListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest} message GetCertificateRevocationListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest to JSON. - * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest - * @instance - * @returns {Object.} JSON object - */ - GetCertificateRevocationListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetCertificateRevocationListRequest; - })(); - - v1beta1.ListCertificateRevocationListsRequest = (function() { - - /** - * Properties of a ListCertificateRevocationListsRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @interface IListCertificateRevocationListsRequest - * @property {string|null} [parent] ListCertificateRevocationListsRequest parent - * @property {number|null} [pageSize] ListCertificateRevocationListsRequest pageSize - * @property {string|null} [pageToken] ListCertificateRevocationListsRequest pageToken - * @property {string|null} [filter] ListCertificateRevocationListsRequest filter - * @property {string|null} [orderBy] ListCertificateRevocationListsRequest orderBy - */ - - /** - * Constructs a new ListCertificateRevocationListsRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @classdesc Represents a ListCertificateRevocationListsRequest. - * @implements IListCertificateRevocationListsRequest - * @constructor - * @param {google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest=} [properties] Properties to set - */ - function ListCertificateRevocationListsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListCertificateRevocationListsRequest parent. - * @member {string} parent - * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest - * @instance - */ - ListCertificateRevocationListsRequest.prototype.parent = ""; + ListCertificateRevocationListsRequest.prototype.parent = ""; /** * ListCertificateRevocationListsRequest pageSize. @@ -15973,555 +15603,68 @@ * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest instance */ UpdateCertificateRevocationListRequest.create = function create(properties) { - return new UpdateCertificateRevocationListRequest(properties); - }; - - /** - * Encodes the specified UpdateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateCertificateRevocationListRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.certificateRevocationList != null && Object.hasOwnProperty.call(message, "certificateRevocationList")) - $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.encode(message.certificateRevocationList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified UpdateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateCertificateRevocationListRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateCertificateRevocationListRequest message. - * @function verify - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateCertificateRevocationListRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify(message.certificateRevocationList); - if (error) - return "certificateRevocationList." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest - */ - UpdateCertificateRevocationListRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) - return object; - var message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); - if (object.certificateRevocationList != null) { - if (typeof object.certificateRevocationList !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.certificateRevocationList: object expected"); - message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.fromObject(object.certificateRevocationList); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateCertificateRevocationListRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateCertificateRevocationListRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.certificateRevocationList = null; - object.updateMask = null; - object.requestId = ""; - } - if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) - object.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.toObject(message.certificateRevocationList, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateCertificateRevocationListRequest to JSON. - * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateCertificateRevocationListRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateCertificateRevocationListRequest; - })(); - - v1beta1.CreateReusableConfigRequest = (function() { - - /** - * Properties of a CreateReusableConfigRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @interface ICreateReusableConfigRequest - * @property {string|null} [parent] CreateReusableConfigRequest parent - * @property {string|null} [reusableConfigId] CreateReusableConfigRequest reusableConfigId - * @property {google.cloud.security.privateca.v1beta1.IReusableConfig|null} [reusableConfig] CreateReusableConfigRequest reusableConfig - * @property {string|null} [requestId] CreateReusableConfigRequest requestId - */ - - /** - * Constructs a new CreateReusableConfigRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @classdesc Represents a CreateReusableConfigRequest. - * @implements ICreateReusableConfigRequest - * @constructor - * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest=} [properties] Properties to set - */ - function CreateReusableConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateReusableConfigRequest parent. - * @member {string} parent - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @instance - */ - CreateReusableConfigRequest.prototype.parent = ""; - - /** - * CreateReusableConfigRequest reusableConfigId. - * @member {string} reusableConfigId - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @instance - */ - CreateReusableConfigRequest.prototype.reusableConfigId = ""; - - /** - * CreateReusableConfigRequest reusableConfig. - * @member {google.cloud.security.privateca.v1beta1.IReusableConfig|null|undefined} reusableConfig - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @instance - */ - CreateReusableConfigRequest.prototype.reusableConfig = null; - - /** - * CreateReusableConfigRequest requestId. - * @member {string} requestId - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @instance - */ - CreateReusableConfigRequest.prototype.requestId = ""; - - /** - * Creates a new CreateReusableConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest instance - */ - CreateReusableConfigRequest.create = function create(properties) { - return new CreateReusableConfigRequest(properties); - }; - - /** - * Encodes the specified CreateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} message CreateReusableConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateReusableConfigRequest.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.reusableConfigId != null && Object.hasOwnProperty.call(message, "reusableConfigId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.reusableConfigId); - if (message.reusableConfig != null && Object.hasOwnProperty.call(message, "reusableConfig")) - $root.google.cloud.security.privateca.v1beta1.ReusableConfig.encode(message.reusableConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified CreateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest} message CreateReusableConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateReusableConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateReusableConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.reusableConfigId = reader.string(); - break; - case 3: - message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateReusableConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateReusableConfigRequest message. - * @function verify - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateReusableConfigRequest.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.reusableConfigId != null && message.hasOwnProperty("reusableConfigId")) - if (!$util.isString(message.reusableConfigId)) - return "reusableConfigId: string expected"; - if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { - var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.verify(message.reusableConfig); - if (error) - return "reusableConfig." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates a CreateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} CreateReusableConfigRequest - */ - CreateReusableConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest) - return object; - var message = new $root.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.reusableConfigId != null) - message.reusableConfigId = String(object.reusableConfigId); - if (object.reusableConfig != null) { - if (typeof object.reusableConfig !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest.reusableConfig: object expected"); - message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.fromObject(object.reusableConfig); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from a CreateReusableConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest} message CreateReusableConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateReusableConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.reusableConfigId = ""; - object.reusableConfig = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.reusableConfigId != null && message.hasOwnProperty("reusableConfigId")) - object.reusableConfigId = message.reusableConfigId; - if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) - object.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.toObject(message.reusableConfig, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this CreateReusableConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest - * @instance - * @returns {Object.} JSON object - */ - CreateReusableConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CreateReusableConfigRequest; - })(); - - v1beta1.DeleteReusableConfigRequest = (function() { - - /** - * Properties of a DeleteReusableConfigRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @interface IDeleteReusableConfigRequest - * @property {string|null} [name] DeleteReusableConfigRequest name - * @property {string|null} [requestId] DeleteReusableConfigRequest requestId - */ - - /** - * Constructs a new DeleteReusableConfigRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @classdesc Represents a DeleteReusableConfigRequest. - * @implements IDeleteReusableConfigRequest - * @constructor - * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest=} [properties] Properties to set - */ - function DeleteReusableConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteReusableConfigRequest name. - * @member {string} name - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest - * @instance - */ - DeleteReusableConfigRequest.prototype.name = ""; - - /** - * DeleteReusableConfigRequest requestId. - * @member {string} requestId - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest - * @instance - */ - DeleteReusableConfigRequest.prototype.requestId = ""; - - /** - * Creates a new DeleteReusableConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest instance - */ - DeleteReusableConfigRequest.create = function create(properties) { - return new DeleteReusableConfigRequest(properties); + return new UpdateCertificateRevocationListRequest(properties); }; /** - * Encodes the specified DeleteReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. + * Encodes the specified UpdateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} message DeleteReusableConfigRequest message or plain object to encode + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteReusableConfigRequest.encode = function encode(message, writer) { + UpdateCertificateRevocationListRequest.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.certificateRevocationList != null && Object.hasOwnProperty.call(message, "certificateRevocationList")) + $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.encode(message.certificateRevocationList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); return writer; }; /** - * Encodes the specified DeleteReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest.verify|verify} messages. + * Encodes the specified UpdateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest} message DeleteReusableConfigRequest message or plain object to encode + * @param {google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer. + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteReusableConfigRequest.decode = function decode(reader, length) { + UpdateCertificateRevocationListRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); break; case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: message.requestId = reader.string(); break; default: @@ -16533,35 +15676,42 @@ }; /** - * Decodes a DeleteReusableConfigRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteReusableConfigRequest message. + * Verifies an UpdateCertificateRevocationListRequest message. * @function verify - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteReusableConfigRequest.verify = function verify(message) { + UpdateCertificateRevocationListRequest.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.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.verify(message.certificateRevocationList); + if (error) + return "certificateRevocationList." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } if (message.requestId != null && message.hasOwnProperty("requestId")) if (!$util.isString(message.requestId)) return "requestId: string expected"; @@ -16569,60 +15719,71 @@ }; /** - * Creates a DeleteReusableConfigRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} DeleteReusableConfigRequest + * @returns {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest */ - DeleteReusableConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest) + UpdateCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest) return object; - var message = new $root.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest(); + if (object.certificateRevocationList != null) { + if (typeof object.certificateRevocationList !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.certificateRevocationList: object expected"); + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.fromObject(object.certificateRevocationList); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } if (object.requestId != null) message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a DeleteReusableConfigRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateCertificateRevocationListRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @static - * @param {google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest} message DeleteReusableConfigRequest + * @param {google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteReusableConfigRequest.toObject = function toObject(message, options) { + UpdateCertificateRevocationListRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.certificateRevocationList = null; + object.updateMask = null; object.requestId = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) + object.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.toObject(message.certificateRevocationList, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; }; /** - * Converts this DeleteReusableConfigRequest to JSON. + * Converts this UpdateCertificateRevocationListRequest to JSON. * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest * @instance * @returns {Object.} JSON object */ - DeleteReusableConfigRequest.prototype.toJSON = function toJSON() { + UpdateCertificateRevocationListRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteReusableConfigRequest; + return UpdateCertificateRevocationListRequest; })(); v1beta1.GetReusableConfigRequest = (function() { @@ -17358,248 +16519,6 @@ return ListReusableConfigsResponse; })(); - v1beta1.UpdateReusableConfigRequest = (function() { - - /** - * Properties of an UpdateReusableConfigRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @interface IUpdateReusableConfigRequest - * @property {google.cloud.security.privateca.v1beta1.IReusableConfig|null} [reusableConfig] UpdateReusableConfigRequest reusableConfig - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateReusableConfigRequest updateMask - * @property {string|null} [requestId] UpdateReusableConfigRequest requestId - */ - - /** - * Constructs a new UpdateReusableConfigRequest. - * @memberof google.cloud.security.privateca.v1beta1 - * @classdesc Represents an UpdateReusableConfigRequest. - * @implements IUpdateReusableConfigRequest - * @constructor - * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest=} [properties] Properties to set - */ - function UpdateReusableConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateReusableConfigRequest reusableConfig. - * @member {google.cloud.security.privateca.v1beta1.IReusableConfig|null|undefined} reusableConfig - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @instance - */ - UpdateReusableConfigRequest.prototype.reusableConfig = null; - - /** - * UpdateReusableConfigRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @instance - */ - UpdateReusableConfigRequest.prototype.updateMask = null; - - /** - * UpdateReusableConfigRequest requestId. - * @member {string} requestId - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @instance - */ - UpdateReusableConfigRequest.prototype.requestId = ""; - - /** - * Creates a new UpdateReusableConfigRequest instance using the specified properties. - * @function create - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest instance - */ - UpdateReusableConfigRequest.create = function create(properties) { - return new UpdateReusableConfigRequest(properties); - }; - - /** - * Encodes the specified UpdateReusableConfigRequest message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} message UpdateReusableConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateReusableConfigRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reusableConfig != null && Object.hasOwnProperty.call(message, "reusableConfig")) - $root.google.cloud.security.privateca.v1beta1.ReusableConfig.encode(message.reusableConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); - return writer; - }; - - /** - * Encodes the specified UpdateReusableConfigRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest} message UpdateReusableConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateReusableConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateReusableConfigRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateReusableConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateReusableConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateReusableConfigRequest message. - * @function verify - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateReusableConfigRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) { - var error = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.verify(message.reusableConfig); - if (error) - return "reusableConfig." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; - - /** - * Creates an UpdateReusableConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} UpdateReusableConfigRequest - */ - UpdateReusableConfigRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest) - return object; - var message = new $root.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest(); - if (object.reusableConfig != null) { - if (typeof object.reusableConfig !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.reusableConfig: object expected"); - message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.fromObject(object.reusableConfig); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; - - /** - * Creates a plain object from an UpdateReusableConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @static - * @param {google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest} message UpdateReusableConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateReusableConfigRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.reusableConfig = null; - object.updateMask = null; - object.requestId = ""; - } - if (message.reusableConfig != null && message.hasOwnProperty("reusableConfig")) - object.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfig.toObject(message.reusableConfig, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; - - /** - * Converts this UpdateReusableConfigRequest to JSON. - * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateReusableConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpdateReusableConfigRequest; - })(); - v1beta1.OperationMetadata = (function() { /** diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 7dce0554a92..1e7c98c5fcf 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -15,7 +15,9 @@ "go_package": "google.golang.org/genproto/googleapis/cloud/security/privateca/v1beta1;privateca", "java_multiple_files": true, "java_outer_classname": "PrivateCaProto", - "java_package": "com.google.cloud.security.privateca.v1beta1" + "java_package": "com.google.cloud.security.privateca.v1beta1", + "php_namespace": "Google\\Cloud\\Security\\PrivateCA\\V1beta1", + "ruby_package": "Google::Cloud::Security::PrivateCA::V1beta1" }, "nested": { "CertificateAuthority": { @@ -382,9 +384,12 @@ "SignHashAlgorithm": { "values": { "SIGN_HASH_ALGORITHM_UNSPECIFIED": 0, - "RSA_PSS_2048_SHA_256": 1, - "RSA_PSS_3072_SHA_256": 2, - "RSA_PSS_4096_SHA_256": 3, + "RSA_PSS_2048_SHA256": 1, + "RSA_PSS_3072_SHA256": 2, + "RSA_PSS_4096_SHA256": 3, + "RSA_PKCS1_2048_SHA256": 6, + "RSA_PKCS1_3072_SHA256": 7, + "RSA_PKCS1_4096_SHA256": 8, "EC_P256_SHA256": 4, "EC_P384_SHA384": 5 } @@ -528,7 +533,7 @@ "type": "google.protobuf.Duration", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "IMMUTABLE" } }, "revocationDetails": { @@ -1295,17 +1300,6 @@ "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } }, - "CreateCertificateRevocationList": { - "requestType": "CreateCertificateRevocationListRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists", - "(google.api.http).body": "certificate_revocation_list", - "(google.api.method_signature)": "parent,certificate_revocation_list,certificate_revocation_list_id", - "(google.longrunning.operation_info).response_type": "CertificateRevocationList", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } - }, "GetCertificateRevocationList": { "requestType": "GetCertificateRevocationListRequest", "responseType": "CertificateRevocationList", @@ -1333,27 +1327,6 @@ "(google.longrunning.operation_info).metadata_type": "OperationMetadata" } }, - "CreateReusableConfig": { - "requestType": "CreateReusableConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs", - "(google.api.http).body": "reusable_config", - "(google.api.method_signature)": "parent,reusable_config,reusable_config_id", - "(google.longrunning.operation_info).response_type": "ReusableConfig", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } - }, - "DeleteReusableConfig": { - "requestType": "DeleteReusableConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.cloud.security.privateca.v1beta1.OperationMetadata" - } - }, "GetReusableConfig": { "requestType": "GetReusableConfigRequest", "responseType": "ReusableConfig", @@ -1369,17 +1342,6 @@ "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs", "(google.api.method_signature)": "parent" } - }, - "UpdateReusableConfig": { - "requestType": "UpdateReusableConfigRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1beta1/{reusable_config.name=projects/*/locations/*/reusableConfigs/*}", - "(google.api.http).body": "reusable_config", - "(google.api.method_signature)": "reusable_config,update_mask", - "(google.longrunning.operation_info).response_type": "ReusableConfig", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } } } }, @@ -1797,39 +1759,6 @@ } } }, - "CreateCertificateRevocationListRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" - } - }, - "certificateRevocationListId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "certificateRevocationList": { - "type": "CertificateRevocationList", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, "GetCertificateRevocationListRequest": { "fields": { "name": { @@ -1925,58 +1854,6 @@ } } }, - "CreateReusableConfigRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "reusableConfigId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "reusableConfig": { - "type": "ReusableConfig", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteReusableConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "privateca.googleapis.com/ReusableConfig" - } - }, - "requestId": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, "GetReusableConfigRequest": { "fields": { "name": { @@ -2047,31 +1924,6 @@ } } }, - "UpdateReusableConfigRequest": { - "fields": { - "reusableConfig": { - "type": "ReusableConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "requestId": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, "OperationMetadata": { "fields": { "createTime": { diff --git a/packages/google-cloud-security-privateca/samples/README.md b/packages/google-cloud-security-privateca/samples/README.md index 5d6a6a9dab4..ec38ee7fdd0 100644 --- a/packages/google-cloud-security-privateca/samples/README.md +++ b/packages/google-cloud-security-privateca/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Certificate Authority: Node.js Samples](https://github.com/googleapis/nodejs-security-private-ca) +# [Certificate Authority Service: Node.js Samples](https://github.com/googleapis/nodejs-security-private-ca) [![Open in Cloud Shell][shell_img]][shell_link] diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index 2f8b526207a..a2c589d5480 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/src/index.ts @@ -19,6 +19,7 @@ import * as v1beta1 from './v1beta1'; const CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; +type CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; export {v1beta1, CertificateAuthorityServiceClient}; export default {v1beta1, CertificateAuthorityServiceClient}; import * as protos from '../protos/protos'; diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index e747dbc56d7..f27662766ca 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -63,8 +63,10 @@ export class CertificateAuthorityServiceClient { /** * Construct an instance of CertificateAuthorityServiceClient. * - * @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] @@ -84,44 +86,34 @@ export class CertificateAuthorityServiceClient { * 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 CertificateAuthorityServiceClient; 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 CertificateAuthorityServiceClient 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 CertificateAuthorityServiceClient).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 +122,11 @@ export class CertificateAuthorityServiceClient { // 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) { @@ -266,36 +263,12 @@ export class CertificateAuthorityServiceClient { const updateCertificateAuthorityMetadata = protoFilesRoot.lookup( '.google.cloud.security.privateca.v1beta1.OperationMetadata' ) as gax.protobuf.Type; - const createCertificateRevocationListResponse = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.CertificateRevocationList' - ) as gax.protobuf.Type; - const createCertificateRevocationListMetadata = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.OperationMetadata' - ) as gax.protobuf.Type; const updateCertificateRevocationListResponse = protoFilesRoot.lookup( '.google.cloud.security.privateca.v1beta1.CertificateRevocationList' ) as gax.protobuf.Type; const updateCertificateRevocationListMetadata = protoFilesRoot.lookup( '.google.cloud.security.privateca.v1beta1.OperationMetadata' ) as gax.protobuf.Type; - const createReusableConfigResponse = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.ReusableConfig' - ) as gax.protobuf.Type; - const createReusableConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.OperationMetadata' - ) as gax.protobuf.Type; - const deleteReusableConfigResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty' - ) as gax.protobuf.Type; - const deleteReusableConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.OperationMetadata' - ) as gax.protobuf.Type; - const updateReusableConfigResponse = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.ReusableConfig' - ) as gax.protobuf.Type; - const updateReusableConfigMetadata = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1beta1.OperationMetadata' - ) as gax.protobuf.Type; this.descriptors.longrunning = { activateCertificateAuthority: new this._gaxModule.LongrunningDescriptor( @@ -361,15 +334,6 @@ export class CertificateAuthorityServiceClient { updateCertificateAuthorityMetadata ) ), - createCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createCertificateRevocationListResponse.decode.bind( - createCertificateRevocationListResponse - ), - createCertificateRevocationListMetadata.decode.bind( - createCertificateRevocationListMetadata - ) - ), updateCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateCertificateRevocationListResponse.decode.bind( @@ -379,21 +343,6 @@ export class CertificateAuthorityServiceClient { updateCertificateRevocationListMetadata ) ), - createReusableConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createReusableConfigResponse.decode.bind(createReusableConfigResponse), - createReusableConfigMetadata.decode.bind(createReusableConfigMetadata) - ), - deleteReusableConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteReusableConfigResponse.decode.bind(deleteReusableConfigResponse), - deleteReusableConfigMetadata.decode.bind(deleteReusableConfigMetadata) - ), - updateReusableConfig: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateReusableConfigResponse.decode.bind(updateReusableConfigResponse), - updateReusableConfigMetadata.decode.bind(updateReusableConfigMetadata) - ), }; // Put together the default options sent with requests. @@ -458,15 +407,11 @@ export class CertificateAuthorityServiceClient { 'restoreCertificateAuthority', 'scheduleDeleteCertificateAuthority', 'updateCertificateAuthority', - 'createCertificateRevocationList', 'getCertificateRevocationList', 'listCertificateRevocationLists', 'updateCertificateRevocationList', - 'createReusableConfig', - 'deleteReusableConfig', 'getReusableConfig', 'listReusableConfigs', - 'updateReusableConfig', ]; for (const methodName of certificateAuthorityServiceStubMethods) { const callPromise = this.certificateAuthorityServiceStub.then( @@ -500,6 +445,7 @@ export class CertificateAuthorityServiceClient { /** * The DNS address for this API service. + * @returns {string} The DNS address for this service. */ static get servicePath() { return 'privateca.googleapis.com'; @@ -508,6 +454,7 @@ export class CertificateAuthorityServiceClient { /** * 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 'privateca.googleapis.com'; @@ -515,6 +462,7 @@ export class CertificateAuthorityServiceClient { /** * The port for this API service. + * @returns {number} The default port for this service. */ static get port() { return 443; @@ -523,6 +471,7 @@ export class CertificateAuthorityServiceClient { /** * 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']; @@ -532,8 +481,7 @@ export class CertificateAuthorityServiceClient { 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 @@ -594,7 +542,7 @@ export class CertificateAuthorityServiceClient { * `projects/* /locations/* /certificateAuthorities/*`. * @param {string} [request.certificateId] * Optional. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9-]{1,63}`. This field is required when using a + * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the Enterprise {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|CertificateAuthority.Tier}, * but is optional and its value is ignored otherwise. * @param {google.cloud.security.privateca.v1beta1.Certificate} request.certificate @@ -617,7 +565,11 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.createCertificate(request); */ createCertificate( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, @@ -711,7 +663,11 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.getCertificate(request); */ getCertificate( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, @@ -822,7 +778,11 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.revokeCertificate(request); */ revokeCertificate( request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, @@ -906,7 +866,8 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Update a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. + * Update a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. Currently, the only field you can update is the + * {@link google.cloud.security.privateca.v1beta1.Certificate.labels|labels} field. * * @param {Object} request * The request object that will be sent. @@ -932,7 +893,11 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.updateCertificate(request); */ updateCertificate( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, @@ -1033,7 +998,11 @@ export class CertificateAuthorityServiceClient { * 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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse}. - * 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.fetchCertificateAuthorityCsr(request); */ fetchCertificateAuthorityCsr( request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, @@ -1132,7 +1101,11 @@ export class CertificateAuthorityServiceClient { * 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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. - * 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.getCertificateAuthority(request); */ getCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, @@ -1231,7 +1204,11 @@ export class CertificateAuthorityServiceClient { * 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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. - * 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.getCertificateRevocationList(request); */ getCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, @@ -1329,7 +1306,11 @@ export class CertificateAuthorityServiceClient { * 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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. - * 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.getReusableConfig(request); */ getReusableConfig( request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, @@ -1451,8 +1432,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.activateCertificateAuthority(request); + * const [response] = await operation.promise(); */ activateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, @@ -1508,18 +1496,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the activateCertificateAuthority() method. + * Check the status of the long running operation returned by `activateCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkActivateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkActivateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkActivateCertificateAuthorityProgress( name: string @@ -1590,7 +1579,7 @@ export class CertificateAuthorityServiceClient { * `projects/* /locations/*`. * @param {string} request.certificateAuthorityId * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9-]{1,63}` + * expression `[a-zA-Z0-9_-]{1,63}` * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} request.certificateAuthority * Required. A {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} with initial field values. * @param {string} [request.requestId] @@ -1610,8 +1599,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createCertificateAuthority(request); + * const [response] = await operation.promise(); */ createCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, @@ -1667,18 +1663,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the createCertificateAuthority() method. + * Check the status of the long running operation returned by `createCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkCreateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkCreateCertificateAuthorityProgress( name: string @@ -1763,8 +1760,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.disableCertificateAuthority(request); + * const [response] = await operation.promise(); */ disableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, @@ -1820,18 +1824,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the disableCertificateAuthority() method. + * Check the status of the long running operation returned by `disableCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkDisableCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDisableCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkDisableCertificateAuthorityProgress( name: string @@ -1916,8 +1921,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.enableCertificateAuthority(request); + * const [response] = await operation.promise(); */ enableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, @@ -1973,18 +1985,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the enableCertificateAuthority() method. + * Check the status of the long running operation returned by `enableCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkEnableCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkEnableCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkEnableCertificateAuthorityProgress( name: string @@ -2069,8 +2082,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.restoreCertificateAuthority(request); + * const [response] = await operation.promise(); */ restoreCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, @@ -2126,18 +2146,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the restoreCertificateAuthority() method. + * Check the status of the long running operation returned by `restoreCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkRestoreCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkRestoreCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkRestoreCertificateAuthorityProgress( name: string @@ -2222,8 +2243,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.scheduleDeleteCertificateAuthority(request); + * const [response] = await operation.promise(); */ scheduleDeleteCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, @@ -2279,18 +2307,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the scheduleDeleteCertificateAuthority() method. + * Check the status of the long running operation returned by `scheduleDeleteCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkScheduleDeleteCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkScheduleDeleteCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkScheduleDeleteCertificateAuthorityProgress( name: string @@ -2376,8 +2405,15 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateCertificateAuthority(request); + * const [response] = await operation.promise(); */ updateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, @@ -2433,18 +2469,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the updateCertificateAuthority() method. + * Check the status of the long running operation returned by `updateCertificateAuthority()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkUpdateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkUpdateCertificateAuthorityProgress( name: string @@ -2468,8 +2505,8 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } - createCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, options?: gax.CallOptions ): Promise< [ @@ -2481,8 +2518,8 @@ export class CertificateAuthorityServiceClient { {} | undefined ] >; - createCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, options: gax.CallOptions, callback: Callback< LROperation< @@ -2493,8 +2530,8 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - createCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, @@ -2505,20 +2542,14 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Create a new {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} in a given Project, Location - * for a particular {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * Update a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the location and {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} - * associated with the {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}, in the format - * `projects/* /locations/* /certificateAuthorities/*`. - * @param {string} request.certificateRevocationListId - * Required. It must be unique within a location and match the regular expression - * `[a-zA-Z0-9-]{1,63}` * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList} request.certificateRevocationList - * Required. A {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} with initial field values. + * Required. {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. * @param {string} [request.requestId] * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -2536,11 +2567,18 @@ export class CertificateAuthorityServiceClient { * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateCertificateRevocationList(request); + * const [response] = await operation.promise(); */ - createCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRevocationListRequest, + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, optionsOrCallback?: | gax.CallOptions | Callback< @@ -2583,30 +2621,32 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - parent: request.parent || '', + 'certificate_revocation_list.name': + request.certificateRevocationList!.name || '', }); this.initialize(); - return this.innerApiCalls.createCertificateRevocationList( + return this.innerApiCalls.updateCertificateRevocationList( request, options, callback ); } /** - * Check the status of the long running operation returned by the createCertificateRevocationList() method. + * Check the status of the long running operation returned by `updateCertificateRevocationList()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkCreateCertificateRevocationListProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ - async checkCreateCertificateRevocationListProgress( + async checkUpdateCertificateRevocationListProgress( name: string ): Promise< LROperation< @@ -2620,7 +2660,7 @@ export class CertificateAuthorityServiceClient { const [operation] = await this.operationsClient.getOperation(request); const decodeOperation = new gax.Operation( operation, - this.descriptors.longrunning.createCertificateRevocationList, + this.descriptors.longrunning.updateCertificateRevocationList, gax.createDefaultBackoffSettings() ); return decodeOperation as LROperation< @@ -2628,99 +2668,100 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } - updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, options?: gax.CallOptions ): Promise< [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.cloud.security.privateca.v1beta1.ICertificate[], + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse ] >; - updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, options: gax.CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate > ): void; - updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate > ): void; /** - * Update a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. + * Lists {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}. * * @param {Object} request * The request object that will be sent. - * @param {google.cloud.security.privateca.v1beta1.CertificateRevocationList} request.certificateRevocationList - * Required. {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}, in the format + * `projects/* /locations/* /certificateauthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. + * The first element of the array is Array of [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * 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 `listCertificatesAsync()` + * 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. */ - updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, optionsOrCallback?: | gax.CallOptions - | Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined + | PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate >, - callback?: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate > ): Promise< [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined + protos.google.cloud.security.privateca.v1beta1.ICertificate[], + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse ] > | void { request = request || {}; @@ -2737,636 +2778,14 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers[ 'x-goog-request-params' ] = gax.routingHeader.fromParams({ - 'certificate_revocation_list.name': - request.certificateRevocationList!.name || '', + parent: request.parent || '', }); this.initialize(); - return this.innerApiCalls.updateCertificateRevocationList( - request, - options, - callback - ); - } - /** - * Check the status of the long running operation returned by the updateCertificateRevocationList() method. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * - */ - async checkUpdateCertificateRevocationListProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.updateCertificateRevocationList, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - >; + return this.innerApiCalls.listCertificates(request, options, callback); } - createReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, - options?: gax.CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, - options: gax.CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; + /** - * Create a new {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} in a given Project and Location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}, in the format - * `projects/* /locations/*`. - * @param {string} request.reusableConfigId - * Required. It must be unique within a location and match the regular - * expression `[a-zA-Z0-9-]{1,63}` - * @param {google.cloud.security.privateca.v1beta1.ReusableConfig} request.reusableConfig - * Required. A {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} with initial field values. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - createReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.ICreateReusableConfigRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | 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.createReusableConfig(request, options, callback); - } - /** - * Check the status of the long running operation returned by the createReusableConfig() method. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkCreateReusableConfigProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * - */ - async checkCreateReusableConfigProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ReusableConfig, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.createReusableConfig, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.security.privateca.v1beta1.ReusableConfig, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - >; - } - deleteReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, - options?: gax.CallOptions - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - deleteReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, - options: gax.CallOptions, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - deleteReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, - callback: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * DeleteReusableConfig deletes a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} in the format - * `projects/* /locations/* /reusableConfigs/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - deleteReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IDeleteReusableConfigRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | 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.deleteReusableConfig(request, options, callback); - } - /** - * Check the status of the long running operation returned by the deleteReusableConfig() method. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkDeleteReusableConfigProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * - */ - async checkDeleteReusableConfigProgress( - name: string - ): Promise< - LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.deleteReusableConfig, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.protobuf.Empty, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - >; - } - updateReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, - options?: gax.CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, - options: gax.CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - /** - * Update a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1beta1.ReusableConfig} request.reusableConfig - * Required. {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Operation]{@link google.longrunning.Operation}. - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - updateReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateReusableConfigRequest, - optionsOrCallback?: - | gax.CallOptions - | Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - >, - callback?: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | 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({ - 'reusable_config.name': request.reusableConfig!.name || '', - }); - this.initialize(); - return this.innerApiCalls.updateReusableConfig(request, options, callback); - } - /** - * Check the status of the long running operation returned by the updateReusableConfig() method. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkUpdateReusableConfigProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * - */ - async checkUpdateReusableConfigProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ReusableConfig, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.updateReusableConfig, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.security.privateca.v1beta1.ReusableConfig, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - >; - } - listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options?: gax.CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.ICertificate[], - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, - protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - ] - >; - listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options: gax.CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificate - > - ): void; - listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificate - > - ): void; - /** - * Lists {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}, in the format - * `projects/* /locations/* /certificateauthorities/*`. - * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} to include in the - * response. Further {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates} can subsequently be obtained - * by including the - * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent - * request. If unspecified, the server will pick an appropriate default. - * @param {string} [request.pageToken] - * Optional. Pagination token, returned earlier via - * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. - * @param {string} [request.filter] - * Optional. Only include resources that match the filter in the response. - * @param {string} [request.orderBy] - * Optional. Specify how the results should be sorted. - * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 [ListCertificatesRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest} - * 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 - * [ListCertificatesResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. - */ - listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - optionsOrCallback?: - | gax.CallOptions - | PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificate - >, - callback?: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificate - > - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.ICertificate[], - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, - protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - ] - > | 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.listCertificates(request, options, callback); - } - - /** - * Equivalent to {@link listCertificates}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listCertificates} 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 @@ -3384,13 +2803,24 @@ export class CertificateAuthorityServiceClient { * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. * @param {string} [request.filter] - * Optional. Only include resources that match the filter in the response. + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). * @param {string} [request.orderBy] - * Optional. Specify how the results should be sorted. + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 `listCertificatesAsync()` + * 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. */ listCertificatesStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, @@ -3415,10 +2845,9 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listCertificates}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listCertificates`, 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 @@ -3436,13 +2865,28 @@ export class CertificateAuthorityServiceClient { * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. * @param {string} [request.filter] - * Optional. Only include resources that match the filter in the response. + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). * @param {string} [request.orderBy] - * Optional. Specify how the results should be sorted. + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). * @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 + * [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. 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.listCertificatesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listCertificatesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, @@ -3528,19 +2972,14 @@ export class CertificateAuthorityServiceClient { * 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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. - * 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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority} 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 [ListCertificateAuthoritiesRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest} - * 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 - * [ListCertificateAuthoritiesResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listCertificateAuthoritiesAsync()` + * 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. */ listCertificateAuthorities( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, @@ -3592,18 +3031,7 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listCertificateAuthorities}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listCertificateAuthorities} 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 @@ -3628,6 +3056,13 @@ export class CertificateAuthorityServiceClient { * 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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority} 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 `listCertificateAuthoritiesAsync()` + * 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. */ listCertificateAuthoritiesStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, @@ -3652,10 +3087,9 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listCertificateAuthorities}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listCertificateAuthorities`, 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 @@ -3679,7 +3113,18 @@ export class CertificateAuthorityServiceClient { * @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 + * [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. 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.listCertificateAuthoritiesAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listCertificateAuthoritiesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, @@ -3765,19 +3210,14 @@ export class CertificateAuthorityServiceClient { * 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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. - * 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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList} 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 [ListCertificateRevocationListsRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest} - * 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 - * [ListCertificateRevocationListsResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listCertificateRevocationListsAsync()` + * 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. */ listCertificateRevocationLists( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, @@ -3829,18 +3269,7 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listCertificateRevocationLists}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listCertificateRevocationLists} 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 @@ -3865,6 +3294,13 @@ export class CertificateAuthorityServiceClient { * 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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList} 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 `listCertificateRevocationListsAsync()` + * 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. */ listCertificateRevocationListsStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, @@ -3889,10 +3325,9 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listCertificateRevocationLists}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listCertificateRevocationLists`, 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 @@ -3916,7 +3351,18 @@ export class CertificateAuthorityServiceClient { * @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 + * [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. 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.listCertificateRevocationListsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listCertificateRevocationListsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, @@ -4002,19 +3448,14 @@ export class CertificateAuthorityServiceClient { * 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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. - * 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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig} 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 [ListReusableConfigsRequest]{@link google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest} - * 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 - * [ListReusableConfigsResponse]{@link google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listReusableConfigsAsync()` + * 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. */ listReusableConfigs( request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, @@ -4062,18 +3503,7 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listReusableConfigs}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listReusableConfigs} 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 @@ -4098,6 +3528,13 @@ export class CertificateAuthorityServiceClient { * 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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig} 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 `listReusableConfigsAsync()` + * 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. */ listReusableConfigsStream( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, @@ -4122,10 +3559,9 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listReusableConfigs}, but returns an iterable object. - * - * for-await-of syntax is used with the iterable to recursively get response element on-demand. + * Equivalent to `listReusableConfigs`, 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 @@ -4149,7 +3585,18 @@ export class CertificateAuthorityServiceClient { * @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 + * [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. 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.listReusableConfigsAsync(request); + * for await (const response of iterable) { + * // process response + * } */ listReusableConfigsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, @@ -4492,9 +3939,10 @@ export class CertificateAuthorityServiceClient { } /** - * 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-security-privateca/src/v1beta1/certificate_authority_service_client_config.json b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json index d4306afea1d..76b91dd1bea 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client_config.json @@ -100,11 +100,6 @@ "retry_codes_name": "unknown_deadline_exceeded_unavailable", "retry_params_name": "default" }, - "CreateCertificateRevocationList": { - "timeout_millis": 60000, - "retry_codes_name": "unknown_deadline_exceeded_unavailable", - "retry_params_name": "default" - }, "GetCertificateRevocationList": { "timeout_millis": 60000, "retry_codes_name": "unknown_deadline_exceeded_unavailable", @@ -120,16 +115,6 @@ "retry_codes_name": "unknown_deadline_exceeded_unavailable", "retry_params_name": "default" }, - "CreateReusableConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unknown_deadline_exceeded_unavailable", - "retry_params_name": "default" - }, - "DeleteReusableConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unknown_deadline_exceeded_unavailable", - "retry_params_name": "default" - }, "GetReusableConfig": { "timeout_millis": 60000, "retry_codes_name": "unknown_deadline_exceeded_unavailable", @@ -139,11 +124,6 @@ "timeout_millis": 60000, "retry_codes_name": "unknown_deadline_exceeded_unavailable", "retry_params_name": "default" - }, - "UpdateReusableConfig": { - "timeout_millis": 60000, - "retry_codes_name": "unknown_deadline_exceeded_unavailable", - "retry_params_name": "default" } } } diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 9451a385a30..67734cba35e 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,22 +4,14 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-security-private-ca.git", - "sha": "5479370ec8bc2f9c7cb0c155e4e8fa4c06c83ce2" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "7e377ce8f06ced48a79b45d97eebccb8a51f1e28", - "internalRef": "333323660" + "sha": "8a6cda395eb2011139b4c2f48e6fe755875b35bf" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "916c10e8581804df2b48a0f0457d848f3faa582e" + "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" } } ], @@ -33,5 +25,78 @@ "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", + "api-extractor.json", + "linkinator.config.json", + "package-lock.json.2869839641", + "protos/google/cloud/security/privateca/v1beta1/resources.proto", + "protos/google/cloud/security/privateca/v1beta1/service.proto", + "protos/protos.d.ts", + "protos/protos.js", + "protos/protos.json", + "renovate.json", + "samples/README.md", + "samples/package-lock.json.344714580", + "src/index.ts", + "src/v1beta1/certificate_authority_service_client.ts", + "src/v1beta1/certificate_authority_service_client_config.json", + "src/v1beta1/certificate_authority_service_proto_list.json", + "src/v1beta1/index.ts", + "system-test/fixtures/sample/src/index.js", + "system-test/fixtures/sample/src/index.ts", + "system-test/install.ts", + "test/gapic_certificate_authority_service_v1beta1.ts", + "tsconfig.json", + "webpack.config.js" ] } \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/synth.py b/packages/google-cloud-security-privateca/synth.py index 5f9fbac8127..72f023082a6 100644 --- a/packages/google-cloud-security-privateca/synth.py +++ b/packages/google-cloud-security-privateca/synth.py @@ -30,12 +30,12 @@ version, bazel_target=f"//google/cloud/security/privateca/{version}:security-privateca-{version}-nodejs" ) - s.copy(library, excludes=["package.json", "README.md"]) + s.copy(library, excludes=["package.json", "README.md", "linkinator.config.json"]) # Copy common templates common_templates = gcp.CommonTemplates() templates = common_templates.node_library( source_location='build/src', versions=['v1beta1']) -s.copy(templates, excludes=["README.md", "package.json"]) +s.copy(templates, excludes=["README.md", "package.json", "linkinator.config.json"]) node.postprocess_gapic_library() diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts index 6007daba8c3..380f4d7ce92 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts @@ -18,8 +18,19 @@ import {CertificateAuthorityServiceClient} from '@google-cloud/security-private-ca'; +// check that the client class type name can be used +function doStuffWithCertificateAuthorityServiceClient( + client: CertificateAuthorityServiceClient +) { + client.close(); +} + function main() { - new CertificateAuthorityServiceClient(); + // check that the client instance can be created + const certificateAuthorityServiceClient = new CertificateAuthorityServiceClient(); + doStuffWithCertificateAuthorityServiceClient( + certificateAuthorityServiceClient + ); } main(); diff --git a/packages/google-cloud-security-privateca/system-test/install.ts b/packages/google-cloud-security-privateca/system-test/install.ts index 4c1ba3eb79a..39d90f771de 100644 --- a/packages/google-cloud-security-privateca/system-test/install.ts +++ b/packages/google-cloud-security-privateca/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); }); }); diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index f905f5b84cd..1b7dcc4e9b4 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -2689,217 +2689,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); }); - describe('createCertificateRevocationList', () => { - it('invokes createCertificateRevocationList without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createCertificateRevocationList = stubLongRunningCall( - expectedResponse - ); - const [operation] = await client.createCertificateRevocationList(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes createCertificateRevocationList without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createCertificateRevocationList = stubLongRunningCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.createCertificateRevocationList( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes createCertificateRevocationList with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createCertificateRevocationList = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects( - client.createCertificateRevocationList(request), - expectedError - ); - assert( - (client.innerApiCalls.createCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes createCertificateRevocationList with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRevocationListRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createCertificateRevocationList = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createCertificateRevocationList(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkCreateCertificateRevocationListProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateCertificateRevocationListProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateCertificateRevocationListProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkCreateCertificateRevocationListProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - describe('updateCertificateRevocationList', () => { it('invokes updateCertificateRevocationList without error', async () => { const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( @@ -3115,634 +2904,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); }); - describe('createReusableConfig', () => { - it('invokes createReusableConfig without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createReusableConfig = stubLongRunningCall( - expectedResponse - ); - const [operation] = await client.createReusableConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes createReusableConfig without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createReusableConfig = stubLongRunningCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.createReusableConfig( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes createReusableConfig with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createReusableConfig = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.createReusableConfig(request), expectedError); - assert( - (client.innerApiCalls.createReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes createReusableConfig with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.CreateReusableConfigRequest() - ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.createReusableConfig = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.createReusableConfig(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkCreateReusableConfigProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateReusableConfigProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateReusableConfigProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkCreateReusableConfigProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('deleteReusableConfig', () => { - it('invokes deleteReusableConfig without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteReusableConfig = stubLongRunningCall( - expectedResponse - ); - const [operation] = await client.deleteReusableConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes deleteReusableConfig without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteReusableConfig = stubLongRunningCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.deleteReusableConfig( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.protobuf.IEmpty, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes deleteReusableConfig with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteReusableConfig = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.deleteReusableConfig(request), expectedError); - assert( - (client.innerApiCalls.deleteReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes deleteReusableConfig with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.DeleteReusableConfigRequest() - ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteReusableConfig = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.deleteReusableConfig(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkDeleteReusableConfigProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteReusableConfigProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteReusableConfigProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkDeleteReusableConfigProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - - describe('updateReusableConfig', () => { - it('invokes updateReusableConfig without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() - ); - request.reusableConfig = {}; - request.reusableConfig.name = ''; - const expectedHeaderRequestParams = 'reusable_config.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateReusableConfig = stubLongRunningCall( - expectedResponse - ); - const [operation] = await client.updateReusableConfig(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes updateReusableConfig without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() - ); - request.reusableConfig = {}; - request.reusableConfig.name = ''; - const expectedHeaderRequestParams = 'reusable_config.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateReusableConfig = stubLongRunningCallWithCallback( - expectedResponse - ); - const promise = new Promise((resolve, reject) => { - client.updateReusableConfig( - request, - ( - err?: Error | null, - result?: LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - > | null - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - } - ); - }); - const operation = (await promise) as LROperation< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >; - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); - }); - - it('invokes updateReusableConfig with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() - ); - request.reusableConfig = {}; - request.reusableConfig.name = ''; - const expectedHeaderRequestParams = 'reusable_config.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.updateReusableConfig = stubLongRunningCall( - undefined, - expectedError - ); - await assert.rejects(client.updateReusableConfig(request), expectedError); - assert( - (client.innerApiCalls.updateReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes updateReusableConfig with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.security.privateca.v1beta1.UpdateReusableConfigRequest() - ); - request.reusableConfig = {}; - request.reusableConfig.name = ''; - const expectedHeaderRequestParams = 'reusable_config.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; - const expectedError = new Error('expected'); - client.innerApiCalls.updateReusableConfig = stubLongRunningCall( - undefined, - undefined, - expectedError - ); - const [operation] = await client.updateReusableConfig(request); - await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); - }); - - it('invokes checkUpdateReusableConfigProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateReusableConfigProgress( - expectedResponse.name - ); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateReusableConfigProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall( - undefined, - expectedError - ); - await assert.rejects( - client.checkUpdateReusableConfigProgress(''), - expectedError - ); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - }); - describe('listCertificates', () => { it('invokes listCertificates without error', async () => { const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( From 36f7928a8b7fce1b1607ac18aae148f484775c50 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Tue, 10 Nov 2020 15:06:38 -0800 Subject: [PATCH 012/113] feat!: Updates to Certificate Authority Service for Beta release (#21) * chore: manually run synthtool * build: ignore broken link for time being since it hasn't been generated --- .../google-cloud-security-privateca/README.md | 2 +- .../samples/quickstart.js | 2 + .../certificate_authority_service_client.ts | 56 +++++++++++-------- .../synth.metadata | 12 +++- 4 files changed, 45 insertions(+), 27 deletions(-) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index b66d4723b82..62fad074d8e 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -5,7 +5,7 @@ # [Google Cloud Certificate Authority: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) -[![npm version](https://img.shields.io/npm/v/@google-cloud/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) +[![npm version](https://img.shields.io/npm/v/privateca.svg)](https://www.npmjs.com/package/@google-cloud/security-private-ca) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) diff --git a/packages/google-cloud-security-privateca/samples/quickstart.js b/packages/google-cloud-security-privateca/samples/quickstart.js index cb4500ea22e..16031a61a96 100644 --- a/packages/google-cloud-security-privateca/samples/quickstart.js +++ b/packages/google-cloud-security-privateca/samples/quickstart.js @@ -13,6 +13,8 @@ 'use strict'; +// eslint-disable-next-line no-unused-vars +const thing = 'hello'; async function main(projectId, location, name) { // [START cloud_certificate_authority_quickstart] // Imports the Google Cloud client library diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index f27662766ca..412b0371075 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -2632,19 +2632,18 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by `updateCertificateRevocationList()`. + * Check the status of the long running operation returned by the updateCertificateRevocationList() method. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * + * @example: + * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + * */ async checkUpdateCertificateRevocationListProgress( name: string @@ -2730,14 +2729,19 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * The client library will perform auto-pagination by default: it will call the API as many + * 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. - * Note that it can affect your quota. - * We recommend using `listCertificatesAsync()` - * 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. + * + * When autoPaginate: false is specified through options, the array has three elements. + * The first element is Array of [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 [ListCertificatesRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest} + * 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 + * [ListCertificatesResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse}. + * + * The promise has a method named "cancel" which cancels the ongoing API call. */ listCertificates( request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, @@ -2785,7 +2789,18 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * Equivalent to {@link listCertificates}, but returns a NodeJS Stream object. + * + * This fetches the paged responses for {@link listCertificates} 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 @@ -2814,13 +2829,6 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 `listCertificatesAsync()` - * 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. */ listCertificatesStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 67734cba35e..771ee4ff1e0 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,14 +4,22 @@ "git": { "name": ".", "remote": "git@github.com:googleapis/nodejs-security-private-ca.git", - "sha": "8a6cda395eb2011139b4c2f48e6fe755875b35bf" + "sha": "dae7dddb941fac3984d882be947050e3efbafa2f" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", + "internalRef": "339708980" } }, { "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "1f1148d3c7a7a52f0c98077f976bd9b3c948ee2b" + "sha": "ea52b8a0bd560f72f376efcf45197fb7c8869120" } } ], From 36046ef25f8c5e31d40f4c3375d6d29f90390847 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 11 Nov 2020 13:28:00 -0800 Subject: [PATCH 013/113] build: change repo metadata for doc genereation (#31) --- packages/google-cloud-security-privateca/.repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 67a839f983a..38911b4dfbc 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -1,5 +1,5 @@ { - "name": "nodejs-security-private-ca", + "name": "security-private-ca", "name_pretty": "Certificate Authority Service", "product_documentation": "https://cloud.google.com/certificate-authority-service", "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", From 5d2392693a0bc3f35e05d181c146247d9a9afa18 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 13 Nov 2020 16:19:17 -0800 Subject: [PATCH 014/113] chore: release 2.0.0 (#30) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../google-cloud-security-privateca/CHANGELOG.md | 16 ++++++++++++++++ .../google-cloud-security-privateca/package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index c23bb0b9c4c..ea35a3cfd81 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [2.0.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v1.0.0...v2.0.0) (2020-11-11) + + +### ⚠ BREAKING CHANGES + +* Updates to Certificate Authority Service for Beta release (#21) + +### Features + +* Updates to Certificate Authority Service for Beta release ([#21](https://www.github.com/googleapis/nodejs-security-private-ca/issues/21)) ([8e3fb52](https://www.github.com/googleapis/nodejs-security-private-ca/commit/8e3fb52688fc93bbbe4f627d06121384cca84785)) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#28](https://www.github.com/googleapis/nodejs-security-private-ca/issues/28)) ([5e9de83](https://www.github.com/googleapis/nodejs-security-private-ca/commit/5e9de8377ad9d56037d86ac40e9765d6f3b60681)) + ## 1.0.0 (2020-09-24) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index c634bf363e1..a1af36c93f9 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "1.0.0", + "version": "2.0.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 2f267a4f5b9..daf85f43aac 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^1.0.0" + "@google-cloud/security-private-ca": "^2.0.0" }, "devDependencies": { "c8": "^7.1.0", From e1d4c979bf20c319f4e341d3faf477090d091822 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 24 Nov 2020 07:56:43 -0800 Subject: [PATCH 015/113] build: stop ignoring links in linkinator.config.json (#26) --- .../linkinator.config.json | 3 +- .../protos/protos.json | 348 ++++++++++++++++-- .../certificate_authority_service_client.ts | 32 +- .../synth.metadata | 12 +- 4 files changed, 337 insertions(+), 58 deletions(-) diff --git a/packages/google-cloud-security-privateca/linkinator.config.json b/packages/google-cloud-security-privateca/linkinator.config.json index 8a73a453453..29a223b6db6 100644 --- a/packages/google-cloud-security-privateca/linkinator.config.json +++ b/packages/google-cloud-security-privateca/linkinator.config.json @@ -3,8 +3,7 @@ "skip": [ "https://codecov.io/gh/googleapis/", "www.googleapis.com", - "img.shields.io", - "https://googleapis.dev/nodejs/security-private-ca/latest/index.html" + "img.shields.io" ], "silent": true, "concurrency": 10 diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 1e7c98c5fcf..f685a0479f1 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -1163,7 +1163,18 @@ "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates", "(google.api.http).body": "certificate", "(google.api.method_signature)": "parent,certificate,certificate_id" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates", + "body": "certificate" + } + }, + { + "(google.api.method_signature)": "parent,certificate,certificate_id" + } + ] }, "GetCertificate": { "requestType": "GetCertificateRequest", @@ -1171,7 +1182,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListCertificates": { "requestType": "ListCertificatesRequest", @@ -1179,7 +1200,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "RevokeCertificate": { "requestType": "RevokeCertificateRequest", @@ -1188,7 +1219,18 @@ "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificates/*}:revoke", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "UpdateCertificate": { "requestType": "UpdateCertificateRequest", @@ -1197,7 +1239,18 @@ "(google.api.http).patch": "/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}", "(google.api.http).body": "certificate", "(google.api.method_signature)": "certificate,update_mask" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{certificate.name=projects/*/locations/*/certificateAuthorities/*/certificates/*}", + "body": "certificate" + } + }, + { + "(google.api.method_signature)": "certificate,update_mask" + } + ] }, "ActivateCertificateAuthority": { "requestType": "ActivateCertificateAuthorityRequest", @@ -1208,7 +1261,24 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:activate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "CreateCertificateAuthority": { "requestType": "CreateCertificateAuthorityRequest", @@ -1219,7 +1289,24 @@ "(google.api.method_signature)": "parent,certificate_authority,certificate_authority_id", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities", + "body": "certificate_authority" + } + }, + { + "(google.api.method_signature)": "parent,certificate_authority,certificate_authority_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "DisableCertificateAuthority": { "requestType": "DisableCertificateAuthorityRequest", @@ -1230,7 +1317,24 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:disable", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "EnableCertificateAuthority": { "requestType": "EnableCertificateAuthorityRequest", @@ -1241,7 +1345,24 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:enable", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "FetchCertificateAuthorityCsr": { "requestType": "FetchCertificateAuthorityCsrRequest", @@ -1249,7 +1370,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "GetCertificateAuthority": { "requestType": "GetCertificateAuthorityRequest", @@ -1257,7 +1388,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListCertificateAuthorities": { "requestType": "ListCertificateAuthoritiesRequest", @@ -1265,7 +1406,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/certificateAuthorities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "RestoreCertificateAuthority": { "requestType": "RestoreCertificateAuthorityRequest", @@ -1276,7 +1427,24 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:restore", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "ScheduleDeleteCertificateAuthority": { "requestType": "ScheduleDeleteCertificateAuthorityRequest", @@ -1287,7 +1455,24 @@ "(google.api.method_signature)": "name", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:scheduleDelete", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "UpdateCertificateAuthority": { "requestType": "UpdateCertificateAuthorityRequest", @@ -1298,7 +1483,24 @@ "(google.api.method_signature)": "certificate_authority,update_mask", "(google.longrunning.operation_info).response_type": "CertificateAuthority", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{certificate_authority.name=projects/*/locations/*/certificateAuthorities/*}", + "body": "certificate_authority" + } + }, + { + "(google.api.method_signature)": "certificate_authority,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] }, "GetCertificateRevocationList": { "requestType": "GetCertificateRevocationListRequest", @@ -1306,7 +1508,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListCertificateRevocationLists": { "requestType": "ListCertificateRevocationListsRequest", @@ -1314,7 +1526,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/certificateAuthorities/*}/certificateRevocationLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] }, "UpdateCertificateRevocationList": { "requestType": "UpdateCertificateRevocationListRequest", @@ -1325,7 +1547,24 @@ "(google.api.method_signature)": "certificate_revocation_list,update_mask", "(google.longrunning.operation_info).response_type": "CertificateRevocationList", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{certificate_revocation_list.name=projects/*/locations/*/certificateAuthorities/*/certificateRevocationLists/*}", + "body": "certificate_revocation_list" + } + }, + { + "(google.api.method_signature)": "certificate_revocation_list,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateRevocationList", + "metadata_type": "OperationMetadata" + } + } + ] }, "GetReusableConfig": { "requestType": "GetReusableConfigRequest", @@ -1333,7 +1572,17 @@ "options": { "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/reusableConfigs/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "ListReusableConfigs": { "requestType": "ListReusableConfigsRequest", @@ -1341,7 +1590,17 @@ "options": { "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs", "(google.api.method_signature)": "parent" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/reusableConfigs" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] } } }, @@ -3226,7 +3485,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations}", "(google.api.method_signature)": "name,filter" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations}" + } + }, + { + "(google.api.method_signature)": "name,filter" + } + ] }, "GetOperation": { "requestType": "GetOperationRequest", @@ -3234,7 +3503,17 @@ "options": { "(google.api.http).get": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "DeleteOperation": { "requestType": "DeleteOperationRequest", @@ -3242,7 +3521,17 @@ "options": { "(google.api.http).delete": "/v1/{name=operations/**}", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=operations/**}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "CancelOperation": { "requestType": "CancelOperationRequest", @@ -3251,7 +3540,18 @@ "(google.api.http).post": "/v1/{name=operations/**}:cancel", "(google.api.http).body": "*", "(google.api.method_signature)": "name" - } + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=operations/**}:cancel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] }, "WaitOperation": { "requestType": "WaitOperationRequest", diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 412b0371075..3c315c62c54 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -2899,9 +2899,7 @@ export class CertificateAuthorityServiceClient { listCertificatesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, options?: gax.CallOptions - ): AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.ICertificate - > { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2918,9 +2916,7 @@ export class CertificateAuthorityServiceClient { this.innerApiCalls['listCertificates'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.ICertificate - >; + ) as AsyncIterable; } listCertificateAuthorities( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, @@ -3137,9 +3133,7 @@ export class CertificateAuthorityServiceClient { listCertificateAuthoritiesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, options?: gax.CallOptions - ): AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority - > { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3156,9 +3150,7 @@ export class CertificateAuthorityServiceClient { this.innerApiCalls['listCertificateAuthorities'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority - >; + ) as AsyncIterable; } listCertificateRevocationLists( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, @@ -3375,9 +3367,7 @@ export class CertificateAuthorityServiceClient { listCertificateRevocationListsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, options?: gax.CallOptions - ): AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList - > { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3394,9 +3384,7 @@ export class CertificateAuthorityServiceClient { this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList - >; + ) as AsyncIterable; } listReusableConfigs( request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, @@ -3609,9 +3597,7 @@ export class CertificateAuthorityServiceClient { listReusableConfigsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, options?: gax.CallOptions - ): AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig - > { + ): AsyncIterable { request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -3628,9 +3614,7 @@ export class CertificateAuthorityServiceClient { this.innerApiCalls['listReusableConfigs'] as GaxCall, (request as unknown) as RequestType, callSettings - ) as AsyncIterable< - protos.google.cloud.security.privateca.v1beta1.IReusableConfig - >; + ) as AsyncIterable; } // -------------------- // -- Path templates -- diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 771ee4ff1e0..1266a3d1a27 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -3,16 +3,16 @@ { "git": { "name": ".", - "remote": "git@github.com:googleapis/nodejs-security-private-ca.git", - "sha": "dae7dddb941fac3984d882be947050e3efbafa2f" + "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", + "sha": "8a6cda395eb2011139b4c2f48e6fe755875b35bf" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "00bbad4dfd6633cf4b5f9596c1f93b756bb5c776", - "internalRef": "339708980" + "sha": "c9d7721bd4e22b3a25d914248fac126a5a91d3d9", + "internalRef": "339261149" } }, { @@ -75,18 +75,15 @@ ".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", "api-extractor.json", "linkinator.config.json", - "package-lock.json.2869839641", "protos/google/cloud/security/privateca/v1beta1/resources.proto", "protos/google/cloud/security/privateca/v1beta1/service.proto", "protos/protos.d.ts", @@ -94,7 +91,6 @@ "protos/protos.json", "renovate.json", "samples/README.md", - "samples/package-lock.json.344714580", "src/index.ts", "src/v1beta1/certificate_authority_service_client.ts", "src/v1beta1/certificate_authority_service_client_config.json", From a4bb0b64f95fe512b3e6dd549c4bb1ec4f965912 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 25 Nov 2020 09:05:55 -0800 Subject: [PATCH 016/113] fix(browser): check for fetch on window (#36) * changes without context autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. * fix: do not modify options object, use defaultScopes docs: regenerated jsdoc comments with examples build: use gapic-generator-typescript v1.2.1 Note: these change require google-gax "^2.9.2". @alexander-fenster will make sure the google-gax version is bumped across libraries. PiperOrigin-RevId: 341102751 Source-Author: Google APIs Source-Date: Fri Nov 6 12:56:54 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: b759c563bacf9cd15749be4d2bdd276d3f48ee29 Source-Link: https://github.com/googleapis/googleapis/commit/b759c563bacf9cd15749be4d2bdd276d3f48ee29 * fix: better fallback feature detection, jsdoc update Use gapic-generator-typescript v1.2.2. PiperOrigin-RevId: 342778480 Source-Author: Google APIs Source-Date: Mon Nov 16 20:22:00 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: c6b1c72942991b1c605fe56a6041e06a86a9443e Source-Link: https://github.com/googleapis/googleapis/commit/c6b1c72942991b1c605fe56a6041e06a86a9443e * fix: linting, updated jsdoc blocks Use gapic-generator-typescript v1.2.3. PiperOrigin-RevId: 342976840 Source-Author: Google APIs Source-Date: Tue Nov 17 17:04:11 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: c979fbeb80d1b940790a69183629d799e4c05b4c Source-Link: https://github.com/googleapis/googleapis/commit/c979fbeb80d1b940790a69183629d799e4c05b4c * fix: use optional chaining for window.fetch feature detection Use gapic-generator-typescript v1.2.4. Committer: @alexander-fenster PiperOrigin-RevId: 343136730 Source-Author: Google APIs Source-Date: Wed Nov 18 12:49:25 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 2cda8d285b66c14da57363201b7e4efbca47d034 Source-Link: https://github.com/googleapis/googleapis/commit/2cda8d285b66c14da57363201b7e4efbca47d034 * fix: mark window as global for linter Use gapic-generator-typescript v1.2.5. Committer: @alexander-fenster PiperOrigin-RevId: 343187793 Source-Author: Google APIs Source-Date: Wed Nov 18 17:10:02 2020 -0800 Source-Repo: googleapis/googleapis Source-Sha: 5587028631d4d743fd906c4eb4e4e4649a7ee5ce Source-Link: https://github.com/googleapis/googleapis/commit/5587028631d4d743fd906c4eb4e4e4649a7ee5ce --- .../certificate_authority_service_client.ts | 288 +++++++++--------- .../synth.metadata | 75 +---- 2 files changed, 147 insertions(+), 216 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 3c315c62c54..24b6922de51 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_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, @@ -31,6 +32,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/certificate_authority_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ import * as gapicConfig from './certificate_authority_service_client_config.json'; import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; @@ -86,9 +92,9 @@ export class CertificateAuthorityServiceClient { * 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` @@ -102,7 +108,9 @@ export class CertificateAuthorityServiceClient { 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. @@ -498,7 +506,7 @@ export class CertificateAuthorityServiceClient { // ------------------- createCertificate( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificate, @@ -511,7 +519,7 @@ export class CertificateAuthorityServiceClient { >; createCertificate( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest @@ -574,7 +582,7 @@ export class CertificateAuthorityServiceClient { createCertificate( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest @@ -600,12 +608,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -620,7 +628,7 @@ export class CertificateAuthorityServiceClient { } getCertificate( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificate, @@ -633,7 +641,7 @@ export class CertificateAuthorityServiceClient { >; getCertificate( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest @@ -672,7 +680,7 @@ export class CertificateAuthorityServiceClient { getCertificate( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest @@ -698,12 +706,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -718,7 +726,7 @@ export class CertificateAuthorityServiceClient { } revokeCertificate( request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificate, @@ -731,7 +739,7 @@ export class CertificateAuthorityServiceClient { >; revokeCertificate( request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest @@ -787,7 +795,7 @@ export class CertificateAuthorityServiceClient { revokeCertificate( request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest @@ -813,12 +821,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -833,7 +841,7 @@ export class CertificateAuthorityServiceClient { } updateCertificate( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificate, @@ -846,7 +854,7 @@ export class CertificateAuthorityServiceClient { >; updateCertificate( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest @@ -902,7 +910,7 @@ export class CertificateAuthorityServiceClient { updateCertificate( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.ICertificate, | protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest @@ -928,12 +936,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -948,7 +956,7 @@ export class CertificateAuthorityServiceClient { } fetchCertificateAuthorityCsr( request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, @@ -961,7 +969,7 @@ export class CertificateAuthorityServiceClient { >; fetchCertificateAuthorityCsr( request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest @@ -1007,7 +1015,7 @@ export class CertificateAuthorityServiceClient { fetchCertificateAuthorityCsr( request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrResponse, | protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest @@ -1033,12 +1041,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1057,7 +1065,7 @@ export class CertificateAuthorityServiceClient { } getCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1070,7 +1078,7 @@ export class CertificateAuthorityServiceClient { >; getCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest @@ -1110,7 +1118,7 @@ export class CertificateAuthorityServiceClient { getCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, | protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest @@ -1136,12 +1144,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1160,7 +1168,7 @@ export class CertificateAuthorityServiceClient { } getCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, @@ -1173,7 +1181,7 @@ export class CertificateAuthorityServiceClient { >; getCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest @@ -1213,7 +1221,7 @@ export class CertificateAuthorityServiceClient { getCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, | protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest @@ -1239,12 +1247,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1263,7 +1271,7 @@ export class CertificateAuthorityServiceClient { } getReusableConfig( request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.IReusableConfig, @@ -1276,7 +1284,7 @@ export class CertificateAuthorityServiceClient { >; getReusableConfig( request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< protos.google.cloud.security.privateca.v1beta1.IReusableConfig, | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest @@ -1315,7 +1323,7 @@ export class CertificateAuthorityServiceClient { getReusableConfig( request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< protos.google.cloud.security.privateca.v1beta1.IReusableConfig, | protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest @@ -1341,12 +1349,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1362,7 +1370,7 @@ export class CertificateAuthorityServiceClient { activateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1375,7 +1383,7 @@ export class CertificateAuthorityServiceClient { >; activateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1445,7 +1453,7 @@ export class CertificateAuthorityServiceClient { activateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1473,12 +1481,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1534,7 +1542,7 @@ export class CertificateAuthorityServiceClient { } createCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1547,7 +1555,7 @@ export class CertificateAuthorityServiceClient { >; createCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1612,7 +1620,7 @@ export class CertificateAuthorityServiceClient { createCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1640,12 +1648,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1701,7 +1709,7 @@ export class CertificateAuthorityServiceClient { } disableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1714,7 +1722,7 @@ export class CertificateAuthorityServiceClient { >; disableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1773,7 +1781,7 @@ export class CertificateAuthorityServiceClient { disableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1801,12 +1809,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -1862,7 +1870,7 @@ export class CertificateAuthorityServiceClient { } enableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -1875,7 +1883,7 @@ export class CertificateAuthorityServiceClient { >; enableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1934,7 +1942,7 @@ export class CertificateAuthorityServiceClient { enableCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -1962,12 +1970,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -2023,7 +2031,7 @@ export class CertificateAuthorityServiceClient { } restoreCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2036,7 +2044,7 @@ export class CertificateAuthorityServiceClient { >; restoreCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -2095,7 +2103,7 @@ export class CertificateAuthorityServiceClient { restoreCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -2123,12 +2131,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -2184,7 +2192,7 @@ export class CertificateAuthorityServiceClient { } scheduleDeleteCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2197,7 +2205,7 @@ export class CertificateAuthorityServiceClient { >; scheduleDeleteCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -2256,7 +2264,7 @@ export class CertificateAuthorityServiceClient { scheduleDeleteCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -2284,12 +2292,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -2345,7 +2353,7 @@ export class CertificateAuthorityServiceClient { } updateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2358,7 +2366,7 @@ export class CertificateAuthorityServiceClient { >; updateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -2418,7 +2426,7 @@ export class CertificateAuthorityServiceClient { updateCertificateAuthority( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, @@ -2446,12 +2454,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -2507,7 +2515,7 @@ export class CertificateAuthorityServiceClient { } updateCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ LROperation< @@ -2520,7 +2528,7 @@ export class CertificateAuthorityServiceClient { >; updateCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, - options: gax.CallOptions, + options: CallOptions, callback: Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, @@ -2580,7 +2588,7 @@ export class CertificateAuthorityServiceClient { updateCertificateRevocationList( request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | Callback< LROperation< protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, @@ -2608,12 +2616,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -2632,18 +2640,19 @@ export class CertificateAuthorityServiceClient { ); } /** - * Check the status of the long running operation returned by the updateCertificateRevocationList() method. + * Check the status of the long running operation returned by `updateCertificateRevocationList()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. - * - * @example: - * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); - * + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); */ async checkUpdateCertificateRevocationListProgress( name: string @@ -2669,7 +2678,7 @@ export class CertificateAuthorityServiceClient { } listCertificates( request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificate[], @@ -2679,7 +2688,7 @@ export class CertificateAuthorityServiceClient { >; listCertificates( request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse @@ -2729,24 +2738,19 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 [ListCertificatesRequest]{@link google.cloud.security.privateca.v1beta1.ListCertificatesRequest} - * 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 - * [ListCertificatesResponse]{@link google.cloud.security.privateca.v1beta1.ListCertificatesResponse}. - * - * The promise has a method named "cancel" which cancels the ongoing API call. + * Note that it can affect your quota. + * We recommend using `listCertificatesAsync()` + * 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. */ listCertificates( request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse @@ -2769,12 +2773,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -2789,18 +2793,7 @@ export class CertificateAuthorityServiceClient { } /** - * Equivalent to {@link listCertificates}, but returns a NodeJS Stream object. - * - * This fetches the paged responses for {@link listCertificates} 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 @@ -2829,10 +2822,17 @@ export class CertificateAuthorityServiceClient { * 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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate} 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 `listCertificatesAsync()` + * 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. */ listCertificatesStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -2898,7 +2898,7 @@ export class CertificateAuthorityServiceClient { */ listCertificatesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -2920,7 +2920,7 @@ export class CertificateAuthorityServiceClient { } listCertificateAuthorities( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[], @@ -2930,7 +2930,7 @@ export class CertificateAuthorityServiceClient { >; listCertificateAuthorities( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse @@ -2988,7 +2988,7 @@ export class CertificateAuthorityServiceClient { listCertificateAuthorities( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse @@ -3011,12 +3011,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -3070,7 +3070,7 @@ export class CertificateAuthorityServiceClient { */ listCertificateAuthoritiesStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -3132,7 +3132,7 @@ export class CertificateAuthorityServiceClient { */ listCertificateAuthoritiesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -3154,7 +3154,7 @@ export class CertificateAuthorityServiceClient { } listCertificateRevocationLists( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[], @@ -3164,7 +3164,7 @@ export class CertificateAuthorityServiceClient { >; listCertificateRevocationLists( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse @@ -3222,7 +3222,7 @@ export class CertificateAuthorityServiceClient { listCertificateRevocationLists( request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse @@ -3245,12 +3245,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -3304,7 +3304,7 @@ export class CertificateAuthorityServiceClient { */ listCertificateRevocationListsStream( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -3366,7 +3366,7 @@ export class CertificateAuthorityServiceClient { */ listCertificateRevocationListsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; @@ -3388,7 +3388,7 @@ export class CertificateAuthorityServiceClient { } listReusableConfigs( request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Promise< [ protos.google.cloud.security.privateca.v1beta1.IReusableConfig[], @@ -3398,7 +3398,7 @@ export class CertificateAuthorityServiceClient { >; listReusableConfigs( request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - options: gax.CallOptions, + options: CallOptions, callback: PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse @@ -3456,7 +3456,7 @@ export class CertificateAuthorityServiceClient { listReusableConfigs( request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, optionsOrCallback?: - | gax.CallOptions + | CallOptions | PaginationCallback< protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse @@ -3479,12 +3479,12 @@ export class CertificateAuthorityServiceClient { ] > | 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 || {}; @@ -3534,7 +3534,7 @@ export class CertificateAuthorityServiceClient { */ listReusableConfigsStream( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): Transform { request = request || {}; options = options || {}; @@ -3596,7 +3596,7 @@ export class CertificateAuthorityServiceClient { */ listReusableConfigsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - options?: gax.CallOptions + options?: CallOptions ): AsyncIterable { request = request || {}; options = options || {}; diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 1266a3d1a27..477cabdc5c8 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "8a6cda395eb2011139b4c2f48e6fe755875b35bf" + "sha": "1406fcd128e876f27dfd970e44dbd46a3b0be36f" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "c9d7721bd4e22b3a25d914248fac126a5a91d3d9", - "internalRef": "339261149" + "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", + "internalRef": "343187793" } }, { @@ -33,74 +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", - ".mocharc.js", - ".nycrc", - ".prettierignore", - ".prettierrc.js", - "CODE_OF_CONDUCT.md", - "CONTRIBUTING.md", - "LICENSE", - "api-extractor.json", - "linkinator.config.json", - "protos/google/cloud/security/privateca/v1beta1/resources.proto", - "protos/google/cloud/security/privateca/v1beta1/service.proto", - "protos/protos.d.ts", - "protos/protos.js", - "protos/protos.json", - "renovate.json", - "samples/README.md", - "src/index.ts", - "src/v1beta1/certificate_authority_service_client.ts", - "src/v1beta1/certificate_authority_service_client_config.json", - "src/v1beta1/certificate_authority_service_proto_list.json", - "src/v1beta1/index.ts", - "system-test/fixtures/sample/src/index.js", - "system-test/fixtures/sample/src/index.ts", - "system-test/install.ts", - "test/gapic_certificate_authority_service_v1beta1.ts", - "tsconfig.json", - "webpack.config.js" ] } \ No newline at end of file From 8bb409a6c406f2d5f62d48dd4e7b2814b44387a9 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 017/113] chore: release 2.0.1 (#38) :robot: I have created a release \*beep\* \*boop\* --- ### [2.0.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.0.0...v2.0.1) (2020-11-25) ### Bug Fixes * **browser:** check for fetch on window ([#36](https://www.github.com/googleapis/nodejs-security-private-ca/issues/36)) ([673c8d5](https://www.github.com/googleapis/nodejs-security-private-ca/commit/673c8d518f538a78bd6cf4dcb3878c22d52d8038)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). --- packages/google-cloud-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index ea35a3cfd81..f34ec504cd7 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.0.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.0.0...v2.0.1) (2020-11-25) + + +### Bug Fixes + +* **browser:** check for fetch on window ([#36](https://www.github.com/googleapis/nodejs-security-private-ca/issues/36)) ([673c8d5](https://www.github.com/googleapis/nodejs-security-private-ca/commit/673c8d518f538a78bd6cf4dcb3878c22d52d8038)) + ## [2.0.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v1.0.0...v2.0.0) (2020-11-11) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index a1af36c93f9..bef4fcc25df 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.0.0", + "version": "2.0.1", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index daf85f43aac..9ea0270c8ad 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.0.0" + "@google-cloud/security-private-ca": "^2.0.1" }, "devDependencies": { "c8": "^7.1.0", From ad80172133c418a36ff545a2cd37c766de4ba2ce Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 4 Dec 2020 08:56:21 -0800 Subject: [PATCH 018/113] chore: generate GAPIC metadata JSON file (#40) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1375dc8f-6e92-47e5-b704-19ee285b9aaf/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 | 239 ++++++++++++++++++ .../synth.metadata | 6 +- 2 files changed, 242 insertions(+), 3 deletions(-) create mode 100644 packages/google-cloud-security-privateca/src/v1beta1/gapic_metadata.json diff --git a/packages/google-cloud-security-privateca/src/v1beta1/gapic_metadata.json b/packages/google-cloud-security-privateca/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..79c7f392e86 --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1beta1/gapic_metadata.json @@ -0,0 +1,239 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.security.privateca.v1beta1", + "libraryPackage": "@google-cloud/security-private-ca", + "services": { + "CertificateAuthorityService": { + "clients": { + "grpc": { + "libraryClient": "CertificateAuthorityServiceClient", + "rpcs": { + "CreateCertificate": { + "methods": [ + "createCertificate" + ] + }, + "GetCertificate": { + "methods": [ + "getCertificate" + ] + }, + "RevokeCertificate": { + "methods": [ + "revokeCertificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "updateCertificate" + ] + }, + "FetchCertificateAuthorityCsr": { + "methods": [ + "fetchCertificateAuthorityCsr" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "getCertificateAuthority" + ] + }, + "GetCertificateRevocationList": { + "methods": [ + "getCertificateRevocationList" + ] + }, + "GetReusableConfig": { + "methods": [ + "getReusableConfig" + ] + }, + "ActivateCertificateAuthority": { + "methods": [ + "activateCertificateAuthority" + ] + }, + "CreateCertificateAuthority": { + "methods": [ + "createCertificateAuthority" + ] + }, + "DisableCertificateAuthority": { + "methods": [ + "disableCertificateAuthority" + ] + }, + "EnableCertificateAuthority": { + "methods": [ + "enableCertificateAuthority" + ] + }, + "RestoreCertificateAuthority": { + "methods": [ + "restoreCertificateAuthority" + ] + }, + "ScheduleDeleteCertificateAuthority": { + "methods": [ + "scheduleDeleteCertificateAuthority" + ] + }, + "UpdateCertificateAuthority": { + "methods": [ + "updateCertificateAuthority" + ] + }, + "UpdateCertificateRevocationList": { + "methods": [ + "updateCertificateRevocationList" + ] + }, + "ListCertificates": { + "methods": [ + "listCertificates", + "listCertificatesStream", + "listCertificatesAsync" + ] + }, + "ListCertificateAuthorities": { + "methods": [ + "listCertificateAuthorities", + "listCertificateAuthoritiesStream", + "listCertificateAuthoritiesAsync" + ] + }, + "ListCertificateRevocationLists": { + "methods": [ + "listCertificateRevocationLists", + "listCertificateRevocationListsStream", + "listCertificateRevocationListsAsync" + ] + }, + "ListReusableConfigs": { + "methods": [ + "listReusableConfigs", + "listReusableConfigsStream", + "listReusableConfigsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CertificateAuthorityServiceClient", + "rpcs": { + "CreateCertificate": { + "methods": [ + "createCertificate" + ] + }, + "GetCertificate": { + "methods": [ + "getCertificate" + ] + }, + "RevokeCertificate": { + "methods": [ + "revokeCertificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "updateCertificate" + ] + }, + "FetchCertificateAuthorityCsr": { + "methods": [ + "fetchCertificateAuthorityCsr" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "getCertificateAuthority" + ] + }, + "GetCertificateRevocationList": { + "methods": [ + "getCertificateRevocationList" + ] + }, + "GetReusableConfig": { + "methods": [ + "getReusableConfig" + ] + }, + "ActivateCertificateAuthority": { + "methods": [ + "activateCertificateAuthority" + ] + }, + "CreateCertificateAuthority": { + "methods": [ + "createCertificateAuthority" + ] + }, + "DisableCertificateAuthority": { + "methods": [ + "disableCertificateAuthority" + ] + }, + "EnableCertificateAuthority": { + "methods": [ + "enableCertificateAuthority" + ] + }, + "RestoreCertificateAuthority": { + "methods": [ + "restoreCertificateAuthority" + ] + }, + "ScheduleDeleteCertificateAuthority": { + "methods": [ + "scheduleDeleteCertificateAuthority" + ] + }, + "UpdateCertificateAuthority": { + "methods": [ + "updateCertificateAuthority" + ] + }, + "UpdateCertificateRevocationList": { + "methods": [ + "updateCertificateRevocationList" + ] + }, + "ListCertificates": { + "methods": [ + "listCertificates", + "listCertificatesStream", + "listCertificatesAsync" + ] + }, + "ListCertificateAuthorities": { + "methods": [ + "listCertificateAuthorities", + "listCertificateAuthoritiesStream", + "listCertificateAuthoritiesAsync" + ] + }, + "ListCertificateRevocationLists": { + "methods": [ + "listCertificateRevocationLists", + "listCertificateRevocationListsStream", + "listCertificateRevocationListsAsync" + ] + }, + "ListReusableConfigs": { + "methods": [ + "listReusableConfigs", + "listReusableConfigsStream", + "listReusableConfigsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 477cabdc5c8..726243401b7 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "1406fcd128e876f27dfd970e44dbd46a3b0be36f" + "sha": "93caf82031dc7e8b3d5bc12312a4c327b751c127" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5587028631d4d743fd906c4eb4e4e4649a7ee5ce", - "internalRef": "343187793" + "sha": "d189e871205fea665a9648f7c4676f027495ccaf", + "internalRef": "345596855" } }, { From e2f5df844d4892cb41f76f8a20b390fcfee0e945 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 21 Dec 2020 12:54:02 -0800 Subject: [PATCH 019/113] build(node): add KOKORO_BUILD_ARTIFACTS_SUBDIR to env (#39) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/56502713-3160-459e-b281-8b140bf51d24/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/ba9918cd22874245b55734f57470c719b577e591 --- packages/google-cloud-security-privateca/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 726243401b7..ed40a8a77b9 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "93caf82031dc7e8b3d5bc12312a4c327b751c127" + "sha": "673c8d518f538a78bd6cf4dcb3878c22d52d8038" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ea52b8a0bd560f72f376efcf45197fb7c8869120" + "sha": "ba9918cd22874245b55734f57470c719b577e591" } } ], From a644a04e6082c9248d2715d333263f0be3d642db Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 22 Dec 2020 11:46:27 -0800 Subject: [PATCH 020/113] docs: add instructions for authenticating for system tests (#41) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/fc1dd810-ea11-44c0-ab02-fa000827a405/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/363fe305e9ce34a6cd53951c6ee5f997094b54ee --- .../CONTRIBUTING.md | 15 +++++++++++++-- .../synth.metadata | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-security-privateca/CONTRIBUTING.md b/packages/google-cloud-security-privateca/CONTRIBUTING.md index f6c4cf010e3..d789c7f383e 100644 --- a/packages/google-cloud-security-privateca/CONTRIBUTING.md +++ b/packages/google-cloud-security-privateca/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 Certificate Authority Service 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=privateca.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index ed40a8a77b9..14cbaef3d95 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "673c8d518f538a78bd6cf4dcb3878c22d52d8038" + "sha": "0d90a0588aada256d85f1dbf370fdb4ba6b2d8f8" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "ba9918cd22874245b55734f57470c719b577e591" + "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" } } ], From 8ed29030feeced4a8e2090865f92768fa4dbff27 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 7 Jan 2021 11:54:09 -0800 Subject: [PATCH 021/113] docs: update dates (#42) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/2ad23d83-f6f2-4fe9-8242-08059b565b3c/targets - [ ] To automatically regenerate this PR, check this box. --- packages/google-cloud-security-privateca/.jsdoc.js | 4 ++-- packages/google-cloud-security-privateca/protos/protos.d.ts | 2 +- packages/google-cloud-security-privateca/protos/protos.js | 2 +- packages/google-cloud-security-privateca/src/index.ts | 2 +- .../src/v1beta1/certificate_authority_service_client.ts | 2 +- packages/google-cloud-security-privateca/src/v1beta1/index.ts | 2 +- packages/google-cloud-security-privateca/synth.metadata | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../google-cloud-security-privateca/system-test/install.ts | 2 +- .../test/gapic_certificate_authority_service_v1beta1.ts | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-security-privateca/.jsdoc.js b/packages/google-cloud-security-privateca/.jsdoc.js index 36f47c397e9..c2bc4d431fc 100644 --- a/packages/google-cloud-security-privateca/.jsdoc.js +++ b/packages/google-cloud-security-privateca/.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/security-private-ca', diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index a0b4455a8e9..b8b20e08b09 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index abd84ff1e5c..e99fb0e7587 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/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-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index a2c589d5480..898a1ff8c77 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 24b6922de51..dbdefa87f92 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_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-security-privateca/src/v1beta1/index.ts b/packages/google-cloud-security-privateca/src/v1beta1/index.ts index 32f3be76643..707c36defcc 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/index.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 14cbaef3d95..3cd59a60717 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "0d90a0588aada256d85f1dbf370fdb4ba6b2d8f8" + "sha": "f44c41ad9c8f47c05a5fd9e8c38b5f7006ffde60" } }, { diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js index 6d42488f51c..1f657d6e6a4 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-security-privateca/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-security-privateca/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts index 380f4d7ce92..f943b9e146f 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/system-test/install.ts b/packages/google-cloud-security-privateca/system-test/install.ts index 39d90f771de..d2d61c0396f 100644 --- a/packages/google-cloud-security-privateca/system-test/install.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 1b7dcc4e9b4..e7722f82639 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_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 f764980c0127152a2209551abea3009aedcdd43c Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 8 Jan 2021 18:42:32 -0800 Subject: [PATCH 022/113] feat: adds style enumeration (#43) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/90977a15-29c1-4dcb-9024-e5f073db240e/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-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index b8b20e08b09..8e8ca50870e 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -6804,6 +6804,9 @@ export namespace google { /** ResourceDescriptor singular */ singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } /** Represents a ResourceDescriptor. */ @@ -6833,6 +6836,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 @@ -6912,6 +6918,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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index e99fb0e7587..8133d686229 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -16904,6 +16904,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 */ /** @@ -16916,6 +16917,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) @@ -16970,6 +16972,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 @@ -17007,6 +17017,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; }; @@ -17061,6 +17077,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; @@ -17124,6 +17150,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; }; @@ -17168,6 +17206,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; }; @@ -17184,8 +17239,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 = ""; @@ -17208,6 +17265,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; }; @@ -17238,6 +17300,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-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index f685a0479f1..597b08abea7 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -2312,6 +2312,11 @@ "singular": { "type": "string", "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 } }, "nested": { @@ -2321,6 +2326,12 @@ "ORIGINALLY_SINGLE_PATTERN": 1, "FUTURE_MULTI_PATTERN": 2 } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } } } }, @@ -2443,7 +2454,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-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 3cd59a60717..8a3e0a67e7f 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "f44c41ad9c8f47c05a5fd9e8c38b5f7006ffde60" + "sha": "f8197b0c7a0d72d97ff7e2de987f00f0ae22c9c9" } }, { From d160c40cc73f9dc2da9d624c3e23a4786ddde97e 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 023/113] chore: release 2.1.0 (#44) :robot: I have created a release \*beep\* \*boop\* --- ## [2.1.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.0.1...v2.1.0) (2021-01-09) ### Features * adds style enumeration ([#43](https://www.github.com/googleapis/nodejs-security-private-ca/issues/43)) ([1bdcac1](https://www.github.com/googleapis/nodejs-security-private-ca/commit/1bdcac1a327eab72bd6ed2afe477807df3e1f1c5)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index f34ec504cd7..e0642aa34bc 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.1.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.0.1...v2.1.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#43](https://www.github.com/googleapis/nodejs-security-private-ca/issues/43)) ([1bdcac1](https://www.github.com/googleapis/nodejs-security-private-ca/commit/1bdcac1a327eab72bd6ed2afe477807df3e1f1c5)) + ### [2.0.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.0.0...v2.0.1) (2020-11-25) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index bef4fcc25df..bfb2b5d9adf 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.0.1", + "version": "2.1.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 9ea0270c8ad..2432fb8f8fa 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.0.1" + "@google-cloud/security-private-ca": "^2.1.0" }, "devDependencies": { "c8": "^7.1.0", From 9e6f7487722059284acedc155acd5a18c9279d39 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 27 Jan 2021 08:44:32 -0800 Subject: [PATCH 024/113] refactor(nodejs): move build cop to flakybot (#47) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/541df317-e090-4c6d-88b9-3f79f53b8d13/targets - [ ] To automatically regenerate this PR, check this box. Source-Link: https://github.com/googleapis/synthtool/commit/57c23fa5705499a4181095ced81f0ee0933b64f6 --- packages/google-cloud-security-privateca/synth.metadata | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 8a3e0a67e7f..e63be84c3fc 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "f8197b0c7a0d72d97ff7e2de987f00f0ae22c9c9" + "sha": "a55a97bb32cfd2444035a2166a71438f1bd48a37" } }, { @@ -19,7 +19,7 @@ "git": { "name": "synthtool", "remote": "https://github.com/googleapis/synthtool.git", - "sha": "363fe305e9ce34a6cd53951c6ee5f997094b54ee" + "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" } } ], From 63db2a304c1b8db9604a9d04320d06f022b95148 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Wed, 3 Feb 2021 19:04:06 -0800 Subject: [PATCH 025/113] chore: add UNORDERED_LIST to protos (#49) autosynth cannot find the source of changes triggered by earlier changes in this repository, or by version upgrades to tools such as linters. Co-authored-by: Justin Beckwith --- .../google-cloud-security-privateca/protos/protos.d.ts | 3 ++- packages/google-cloud-security-privateca/protos/protos.js | 7 +++++++ .../google-cloud-security-privateca/protos/protos.json | 3 ++- packages/google-cloud-security-privateca/synth.metadata | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index 8e8ca50870e..0e5e758bc0e 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -6781,7 +6781,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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index 8133d686229..eeead1d9eb7 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -16880,6 +16880,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); @@ -16889,6 +16890,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; })(); @@ -23960,6 +23962,7 @@ case 3: case 4: case 5: + case 6: break; } } @@ -24060,6 +24063,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-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 597b08abea7..2bf6c855c57 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -2267,7 +2267,8 @@ "REQUIRED": 2, "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, - "IMMUTABLE": 5 + "IMMUTABLE": 5, + "UNORDERED_LIST": 6 } }, "resourceReference": { diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index e63be84c3fc..0a73eeda876 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "a55a97bb32cfd2444035a2166a71438f1bd48a37" + "sha": "f3dc6778f8f22e023ef2c84938bdda94e0377c9a" } }, { From 60bf61f9351db91b8ca8a0631b7592eb08c1c0b5 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 7 Mar 2021 09:00:47 -0800 Subject: [PATCH 026/113] build: update gapic-generator-typescript to v1.2.10. (#50) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/cb5a7bf7-f080-4698-bd24-ff5880d64fc8/targets - [ ] To automatically regenerate this PR, check this box. PiperOrigin-RevId: 361273630 Source-Link: https://github.com/googleapis/googleapis/commit/5477122b3e8037a1dc5bc920536158edbd151dc4 --- packages/google-cloud-security-privateca/synth.metadata | 6 +++--- packages/google-cloud-security-privateca/webpack.config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata index 0a73eeda876..d95f9940a75 100644 --- a/packages/google-cloud-security-privateca/synth.metadata +++ b/packages/google-cloud-security-privateca/synth.metadata @@ -4,15 +4,15 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "f3dc6778f8f22e023ef2c84938bdda94e0377c9a" + "sha": "b53d552d8d1cb1c8738c09aaa52c46a89cd8d97d" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "d189e871205fea665a9648f7c4676f027495ccaf", - "internalRef": "345596855" + "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", + "internalRef": "361273630" } }, { diff --git a/packages/google-cloud-security-privateca/webpack.config.js b/packages/google-cloud-security-privateca/webpack.config.js index a5657d95fc4..5aa95cde34a 100644 --- a/packages/google-cloud-security-privateca/webpack.config.js +++ b/packages/google-cloud-security-privateca/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 9d93a30a4682f7d0dadd131eaa6ca2ea157185ef Mon Sep 17 00:00:00 2001 From: Jeffrey Rennie Date: Thu, 18 Mar 2021 16:08:14 -0700 Subject: [PATCH 027/113] chore: migrate to owl bot (#51) --- .../.github/.OwlBot.yaml | 23 +++++++++++ .../.repo-metadata.json | 15 +++---- .../google-cloud-security-privateca/README.md | 20 ++++----- .../synth.metadata | 37 ----------------- .../google-cloud-security-privateca/synth.py | 41 ------------------- 5 files changed, 40 insertions(+), 96 deletions(-) create mode 100644 packages/google-cloud-security-privateca/.github/.OwlBot.yaml delete mode 100644 packages/google-cloud-security-privateca/synth.metadata delete mode 100644 packages/google-cloud-security-privateca/synth.py diff --git a/packages/google-cloud-security-privateca/.github/.OwlBot.yaml b/packages/google-cloud-security-privateca/.github/.OwlBot.yaml new file mode 100644 index 00000000000..4ffd0b02456 --- /dev/null +++ b/packages/google-cloud-security-privateca/.github/.OwlBot.yaml @@ -0,0 +1,23 @@ +# 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/security/privateca/(.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 38911b4dfbc..4e5ead57991 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "security-private-ca", - "name_pretty": "Certificate Authority Service", - "product_documentation": "https://cloud.google.com/certificate-authority-service", "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", - "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues", + "api_id": "privateca.googleapis.com", + "distribution_name": "@google-cloud/security-private-ca", "release_level": "beta", + "default_version": "v1beta1", "language": "nodejs", + "name_pretty": "Certificate Authority Service", "repo": "googleapis/nodejs-security-private-ca", - "distribution_name": "@google-cloud/security-private-ca", - "api_id": "privateca.googleapis.com", - "requires_billing": true + "product_documentation": "https://cloud.google.com/certificate-authority-service", + "requires_billing": true, + "name": "security-private-ca", + "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues" } diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 62fad074d8e..4df79fb8061 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -2,10 +2,10 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Certificate Authority: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) +# [Certificate Authority Service: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) [![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/privateca.svg)](https://www.npmjs.com/package/@google-cloud/security-private-ca) +[![npm version](https://img.shields.io/npm/v/@google-cloud/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) @@ -17,8 +17,8 @@ Privateca client for Node.js A comprehensive list of changes in each version may be found in [the CHANGELOG](https://github.com/googleapis/nodejs-security-private-ca/blob/master/CHANGELOG.md). -* [Google Cloud Certificate Authority Node.js Client API Reference][client-docs] -* [Google Cloud Certificate Authority Documentation][product-docs] +* [Certificate Authority Service Node.js Client API Reference][client-docs] +* [Certificate Authority Service Documentation][product-docs] * [github.com/googleapis/nodejs-security-private-ca](https://github.com/googleapis/nodejs-security-private-ca) Read more about the client libraries for Cloud APIs, including the older @@ -44,14 +44,14 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. -1. [Enable the Google Cloud Certificate Authority API][enable_api]. +1. [Enable the Certificate Authority Service 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 privateca +npm install @google-cloud/security-private-ca ``` @@ -62,7 +62,6 @@ npm install privateca const { CertificateAuthorityServiceClient, - // eslint-disable-next-line node/no-extraneous-require } = require('@google-cloud/security-private-ca'); // TODO(developer): replace with your prefered project ID. @@ -86,8 +85,7 @@ listCertificates(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-security-private-ca/tree/master/samples) directory. The samples' `README.md` -has instructions for running the samples. +Samples are in the [`samples/`](https://github.com/googleapis/nodejs-security-private-ca/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | @@ -95,7 +93,7 @@ has instructions for running the samples. -The [Google Cloud Certificate Authority Node.js Client API Reference][client-docs] documentation +The [Certificate Authority Service Node.js Client API Reference][client-docs] documentation also contains samples. ## Supported Node.js Versions @@ -104,7 +102,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-security-privateca/synth.metadata b/packages/google-cloud-security-privateca/synth.metadata deleted file mode 100644 index d95f9940a75..00000000000 --- a/packages/google-cloud-security-privateca/synth.metadata +++ /dev/null @@ -1,37 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-security-private-ca.git", - "sha": "b53d552d8d1cb1c8738c09aaa52c46a89cd8d97d" - } - }, - { - "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": "57c23fa5705499a4181095ced81f0ee0933b64f6" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "privateca", - "apiVersion": "v1beta1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/synth.py b/packages/google-cloud-security-privateca/synth.py deleted file mode 100644 index 72f023082a6..00000000000 --- a/packages/google-cloud-security-privateca/synth.py +++ /dev/null @@ -1,41 +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( - 'privateca', - version, - bazel_target=f"//google/cloud/security/privateca/{version}:security-privateca-{version}-nodejs" - ) - s.copy(library, excludes=["package.json", "README.md", "linkinator.config.json"]) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=['v1beta1']) -s.copy(templates, excludes=["README.md", "package.json", "linkinator.config.json"]) - -node.postprocess_gapic_library() From 30fb2ab1cbb8e0f5b670e4eb432cf5ee97f902a8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 23 Mar 2021 17:52:28 +0100 Subject: [PATCH 028/113] chore(deps): update dependency sinon to v10 (#56) [![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)) | [`^9.0.3` -> `^10.0.0`](https://renovatebot.com/diffs/npm/sinon/9.2.4/10.0.0) | [![age](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/compatibility-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/10.0.0/confidence-slim/9.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v10.0.0`](https://togithub.com/sinonjs/sinon/blob/master/CHANGELOG.md#​1000--2021-03-22) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v9.2.4...v10.0.0) ================== - Upgrade nise to 4.1.0 - Use [@​sinonjs/eslint-config](https://togithub.com/sinonjs/eslint-config)[@​4](https://togithub.com/4) => Adopts ES2017 => Drops support for IE 11, Legacy Edge and legacy Safari
--- ### Renovate 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index bfb2b5d9adf..97af3d1a04c 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -54,7 +54,7 @@ "mocha": "^8.1.2", "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", "webpack": "^5.0.0", From d459818c856a6c83d73e9b479286dd81b13a2e32 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 31 Mar 2021 07:42:41 -0700 Subject: [PATCH 029/113] build: update .OwlBot.lock with new version of post-processor (#61) Co-authored-by: gcf-owl-bot[bot] <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- packages/google-cloud-security-privateca/src/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index 898a1ff8c77..4759622d6aa 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/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,14 +12,16 @@ // 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 CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; type CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; + export {v1beta1, CertificateAuthorityServiceClient}; export default {v1beta1, CertificateAuthorityServiceClient}; import * as protos from '../protos/protos'; From 99d266c23be37412e1651c7935263fe87bc13a9a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Apr 2021 17:57:24 -0700 Subject: [PATCH 030/113] feat: Publish Certificate Authority Service V1 API (#62) Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- .../security/privateca/v1/resources.proto | 1107 + .../cloud/security/privateca/v1/service.proto | 1417 + .../protos/protos.d.ts | 10315 ++++++- .../protos/protos.js | 22914 +++++++++++++++- .../protos/protos.json | 2880 +- .../src/index.ts | 5 +- .../certificate_authority_service_client.ts | 5677 ++++ ...icate_authority_service_client_config.json | 176 + ...tificate_authority_service_proto_list.json | 4 + .../src/v1/gapic_metadata.json | 333 + .../src/v1/index.ts | 19 + .../gapic_certificate_authority_service_v1.ts | 6541 +++++ 12 files changed, 49435 insertions(+), 1953 deletions(-) create mode 100644 packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto create mode 100644 packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto create mode 100644 packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts create mode 100644 packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client_config.json create mode 100644 packages/google-cloud-security-privateca/src/v1/certificate_authority_service_proto_list.json create mode 100644 packages/google-cloud-security-privateca/src/v1/gapic_metadata.json create mode 100644 packages/google-cloud-security-privateca/src/v1/index.ts create mode 100644 packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto new file mode 100644 index 00000000000..f0cd7a31a9e --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto @@ -0,0 +1,1107 @@ +// 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.security.privateca.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/expr.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1;privateca"; +option java_multiple_files = true; +option java_outer_classname = "PrivateCaResourcesProto"; +option java_package = "com.google.cloud.security.privateca.v1"; +option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1"; +option ruby_package = "Google::Cloud::Security::PrivateCA::V1"; + +// A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority. +// A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate]. +message CertificateAuthority { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateAuthority" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}" + }; + + // URLs where a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will publish content. + message AccessUrls { + // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate is + // published. This will only be set for CAs that have been activated. + string ca_certificate_access_url = 1; + + // The URLs where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRLs are published. This + // will only be set for CAs that have been activated. + repeated string crl_access_urls = 2; + } + + // A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will use. + message KeyVersionSpec { + oneof KeyVersion { + // The resource name for an existing Cloud KMS CryptoKeyVersion in the + // format + // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + // This option enables full flexibility in the key's capabilities and + // properties. + string cloud_kms_key_version = 1; + + // The algorithm to use for creating a managed Cloud KMS key for a for a + // simplified experience. All managed keys will be have their + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. + SignHashAlgorithm algorithm = 2; + } + } + + // The type of a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], indicating its issuing chain. + enum Type { + // Not specified. + TYPE_UNSPECIFIED = 0; + + // Self-signed CA. + SELF_SIGNED = 1; + + // Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // or an unmanaged CA. + SUBORDINATE = 2; + } + + // The state of a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], indicating if it can be used. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // Certificates can be issued from this CA. CRLs will be generated for this + // CA. The CA will be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and will be + // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool]. + ENABLED = 1; + + // Certificates cannot be issued from this CA. CRLs will still be generated. + // The CA will be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but will not be + // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool]. + DISABLED = 2; + + // Certificates can be issued from this CA. CRLs will be generated for this + // CA. The CA will be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but will not + // be used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool]. + STAGED = 3; + + // Certificates cannot be issued from this CA. CRLs will not be generated. + // The CA will not be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and will not be + // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool]. + AWAITING_USER_ACTIVATION = 4; + + // Certificates cannot be issued from this CA. CRLs will not be generated. + // The CA may still be recovered by calling + // [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority] before + // [expire_time][google.cloud.security.privateca.v1.CertificateAuthority.expire_time]. + // The CA will not be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and will not be + // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool]. + DELETED = 5; + } + + // The algorithm of a Cloud KMS CryptoKeyVersion of a + // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the + // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value + // `ASYMMETRIC_SIGN`. These values correspond to the + // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] + // values. For RSA signing algorithms, the PSS algorithms should be preferred, + // use PKCS1 algorithms if required for compatibility. For further + // recommandations, see + // https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. + enum SignHashAlgorithm { + // Not specified. + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256 + RSA_PSS_2048_SHA256 = 1; + + // maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256 + RSA_PSS_3072_SHA256 = 2; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256 + RSA_PSS_4096_SHA256 = 3; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256 + RSA_PKCS1_2048_SHA256 = 6; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256 + RSA_PKCS1_3072_SHA256 = 7; + + // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256 + RSA_PKCS1_4096_SHA256 = 8; + + // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256 + EC_P256_SHA256 = 4; + + // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384 + EC_P384_SHA384 = 5; + } + + // Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + Type type = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. The config used to create a self-signed X.509 certificate or CSR. + CertificateConfig config = 3 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. The desired lifetime of the CA certificate. Used to create the + // "not_before_time" and "not_after_time" fields inside an X.509 + // certificate. + google.protobuf.Duration lifetime = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. If this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] is a self-signed CertificateAuthority, this key + // is also used to sign the self-signed CA certificate. Otherwise, it + // is used to sign a CSR. + KeyVersionSpec key_spec = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], this field will be set + // with the subordinate configuration, which describes its issuers. This may + // be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] must continue to validate. + SubordinateConfig subordinate_config = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + CaPool.Tier tier = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. This [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s certificate chain, including the current + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s certificate. Ordered such that the root issuer + // is the final element (consistent with RFC 5246). For a self-signed CA, this + // will only list the current [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s certificate. + repeated string pem_ca_certificates = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate + // and its issuers. Ordered as self-to-root. + repeated CertificateDescription ca_certificate_descriptions = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will + // publish content, such as the CA certificate and CRLs. This must be a bucket + // name, without any prefixes (such as `gs://`) or suffixes (such as + // `.googleapis.com`). For example, to use a bucket named `my-bucket`, you + // would simply specify `my-bucket`. If not specified, a managed bucket will + // be created. + string gcs_bucket = 11 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. URLs for accessing content published by this CA, such as the CA certificate + // and CRLs. + AccessUrls access_urls = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] was created. + google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] was last updated. + google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] was soft deleted, if + // it is in the [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED] state. + google.protobuf.Timestamp delete_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will be permanently purged, + // if it is in the [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED] state. + google.protobuf.Timestamp expire_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 17 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of +// [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A +// [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more +// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out +// of the trust anchor. +message CaPool { + option (google.api.resource) = { + type: "privateca.googleapis.com/CaPool" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}" + }; + + // Options relating to the publication of each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA + // certificate and CRLs and their inclusion as extensions in issued + // [Certificates][google.cloud.security.privateca.v1.Certificate]. The options set here apply to certificates + // issued by any [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the [CaPool][google.cloud.security.privateca.v1.CaPool]. + message PublishingOptions { + // Required. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate and + // includes its URL in the "Authority Information Access" X.509 extension + // in all issued [Certificates][google.cloud.security.privateca.v1.Certificate]. If this is false, the CA + // certificate will not be published and the corresponding X.509 extension + // will not be written in issued certificates. + bool publish_ca_cert = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRL and includes its + // URL in the "CRL Distribution Points" X.509 extension in all issued + // [Certificates][google.cloud.security.privateca.v1.Certificate]. If this is false, CRLs will not be published + // and the corresponding X.509 extension will not be written in issued + // certificates. + // CRLs will expire 7 days from their creation. However, we will rebuild + // daily. CRLs are also rebuilt shortly after a certificate is revoked. + bool publish_crl = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Defines controls over all certificate issuance within a [CaPool][google.cloud.security.privateca.v1.CaPool]. + message IssuancePolicy { + // Describes a "type" of key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued + // from a [CaPool][google.cloud.security.privateca.v1.CaPool]. + // Note that a single [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType] may refer to either a + // fully-qualified key algorithm, such as RSA 4096, or a family of key + // algorithms, such as any RSA key. + message AllowedKeyType { + // Describes an RSA key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued from + // a [CaPool][google.cloud.security.privateca.v1.CaPool]. + message RsaKeyType { + // Optional. The minimum allowed RSA modulus size, in bits. If this is not set, + // or if set to zero, the service-level min RSA modulus size will + // continue to apply. + int64 min_modulus_size = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum allowed RSA modulus size, in bits. If this is not set, + // or if set to zero, the service will not enforce an explicit upper + // bound on RSA modulus sizes. + int64 max_modulus_size = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Describes a named Elliptic Curve that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] + // issued from a [CaPool][google.cloud.security.privateca.v1.CaPool]. + enum NamedCurve { + // Not specified. + NAMED_CURVE_UNSPECIFIED = 0; + + // Refers to the NIST P-256 curve. + ECDSA_P256 = 2; + + // Refers to the NIST P-384 curve. + ECDSA_P384 = 3; + + // Refers to the Ed25519 curve, as described in RFC 8410. + EDDSA_25519 = 4; + } + + oneof key_type { + // Represents an allowed RSA key type. + RsaKeyType rsa = 1; + + // Represents an allowed Elliptic Curve key type. + NamedCurve elliptic_curve = 2; + } + } + + // [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes] specifies the allowed ways in which + // [Certificates][google.cloud.security.privateca.v1.Certificate] may be requested from this + // [CaPool][google.cloud.security.privateca.v1.CaPool]. + message IssuanceModes { + // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by + // specifying a CSR. + bool allow_csr_based_issuance = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by + // specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig]. + bool allow_config_based_issuance = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Optional. If any [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType] is specified, then the certificate request's + // public key must match one of the key types listed here. Otherwise, + // any key may be used. + repeated AllowedKeyType allowed_key_types = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum lifetime allowed for issued [Certificates][google.cloud.security.privateca.v1.Certificate]. Note + // that if the issuing [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] expires before a + // [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested maximum_lifetime, the effective lifetime will + // be explicitly truncated to match it. + google.protobuf.Duration maximum_lifetime = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes] may be + // used to issue [Certificates][google.cloud.security.privateca.v1.Certificate]. + IssuanceModes allowed_issuance_modes = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of X.509 values that will be applied to all certificates issued + // through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a certificate request includes conflicting + // values for the same properties, they will be overwritten by the values + // defined here. If a certificate request uses a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + // that defines conflicting + // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values] for the same + // properties, the certificate issuance request will fail. + X509Parameters baseline_values = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes constraints on identities that may appear in + // [Certificates][google.cloud.security.privateca.v1.Certificate] issued through this [CaPool][google.cloud.security.privateca.v1.CaPool]. + // If this is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool] will not add restrictions on a + // certificate's identity. + CertificateIdentityConstraints identity_constraints = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the set of X.509 extensions that may appear in a + // [Certificate][google.cloud.security.privateca.v1.Certificate] issued through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a certificate request + // sets extensions that don't appear in the [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions], + // those extensions will be dropped. If a certificate request uses a + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with + // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values] that don't + // appear here, the certificate issuance request will fail. If this is + // omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool] will not add restrictions on a + // certificate's X.509 extensions. These constraints do not apply to X.509 + // extensions set in this [CaPool][google.cloud.security.privateca.v1.CaPool]'s [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values]. + CertificateExtensionConstraints passthrough_extensions = 6 [(google.api.field_behavior) = OPTIONAL]; + } + + // The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool], indicating its supported functionality and/or + // billing SKU. + enum Tier { + // Not specified. + TIER_UNSPECIFIED = 0; + + // Enterprise tier. + ENTERPRISE = 1; + + // DevOps tier. + DEVOPS = 2; + } + + // Output only. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the + // format `projects/*/locations/*/caPools/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this [CaPool][google.cloud.security.privateca.v1.CaPool]. + Tier tier = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. The [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] to control how [Certificates][google.cloud.security.privateca.v1.Certificate] + // will be issued from this [CaPool][google.cloud.security.privateca.v1.CaPool]. + IssuancePolicy issuance_policy = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions] to follow when issuing + // [Certificates][google.cloud.security.privateca.v1.Certificate] from any [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in this + // [CaPool][google.cloud.security.privateca.v1.CaPool]. + PublishingOptions publishing_options = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels with user-defined metadata. + map labels = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] corresponds to a signed X.509 certificate +// Revocation List (CRL). A CRL contains the serial numbers of certificates that +// should no longer be trusted. +message CertificateRevocationList { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateRevocationList" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}" + }; + + // Describes a revoked [Certificate][google.cloud.security.privateca.v1.Certificate]. + message RevokedCertificate { + // The resource name for the [Certificate][google.cloud.security.privateca.v1.Certificate] in the format + // `projects/*/locations/*/caPools/*/certificates/*`. + string certificate = 1 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + }]; + + // The serial number of the [Certificate][google.cloud.security.privateca.v1.Certificate]. + string hex_serial_number = 2; + + // The reason the [Certificate][google.cloud.security.privateca.v1.Certificate] was revoked. + RevocationReason revocation_reason = 3; + } + + // The state of a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList], indicating if it is current. + enum State { + // Not specified. + STATE_UNSPECIFIED = 0; + + // The [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] is up to date. + ACTIVE = 1; + + // The [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] is no longer current. + SUPERSEDED = 2; + } + + // Output only. The resource name for this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] in + // the format + // `projects/*/locations/*/caPools/*certificateAuthorities/*/ + // certificateRevocationLists/*`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The CRL sequence number that appears in pem_crl. + int64 sequence_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revoked serial numbers that appear in pem_crl. + repeated RevokedCertificate revoked_certificates = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The PEM-encoded X.509 CRL. + string pem_crl = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The location where 'pem_crl' can be accessed. + string access_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The [State][google.cloud.security.privateca.v1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] was created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] was updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The revision ID of this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. A new revision is + // committed whenever a new CRL is published. The format is an 8-character + // hexadecimal string. + string revision_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds to a signed X.509 certificate issued by a +// [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. +message Certificate { + option (google.api.resource) = { + type: "privateca.googleapis.com/Certificate" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}" + }; + + // Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1.Certificate]. + message RevocationDetails { + // Indicates why a [Certificate][google.cloud.security.privateca.v1.Certificate] was revoked. + RevocationReason revocation_state = 1; + + // The time at which this [Certificate][google.cloud.security.privateca.v1.Certificate] was revoked. + google.protobuf.Timestamp revocation_time = 2; + } + + // Output only. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the format + // `projects/*/locations/*/caPools/*/certificates/*`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; + + // The config used to create a signed X.509 certificate. + oneof certificate_config { + // Immutable. A pem-encoded X.509 certificate signing request (CSR). + string pem_csr = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. A description of the certificate and key that does not require X.509 or + // ASN.1. + CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Output only. The resource name of the issuing [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format + // `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string issuer_certificate_authority = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. Immutable. The desired lifetime of a certificate. Used to create the + // "not_before_time" and "not_after_time" fields inside an X.509 + // certificate. Note that the lifetime may be truncated if it would extend + // past the life of any certificate authority in the issuing chain. + google.protobuf.Duration lifetime = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Immutable. The resource name for a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] used to issue this + // certificate, in the format + // `projects/*/locations/*/certificateTemplates/*`. + // If this is specified, the caller must have the necessary permission to + // use this template. If this is omitted, no template will be used. + // This template must be in the same location as the [Certificate][google.cloud.security.privateca.v1.Certificate]. + string certificate_template = 6 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateTemplate" + } + ]; + + // Immutable. Specifies how the [Certificate][google.cloud.security.privateca.v1.Certificate]'s identity fields are to be decided. + // If this is omitted, the `DEFAULT` subject mode will be used. + SubjectRequestMode subject_mode = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1.Certificate]. This + // [Certificate][google.cloud.security.privateca.v1.Certificate] is considered revoked if and only if this field is present. + RevocationDetails revocation_details = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The pem-encoded, signed X.509 certificate. + string pem_certificate = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. A structured description of the issued X.509 certificate. + CertificateDescription certificate_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The chain that may be used to verify the X.509 certificate. Expected to be + // in issuer-to-root order according to RFC 5246. + repeated string pem_certificate_chain = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1.Certificate] was created. + google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1.Certificate] was updated. + google.protobuf.Timestamp update_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 14 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate +// issuance. +message CertificateTemplate { + option (google.api.resource) = { + type: "privateca.googleapis.com/CertificateTemplate" + pattern: "projects/{project}/locations/{location}/certificateTemplates/{certificate_template}" + }; + + // Output only. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format + // `projects/*/locations/*/certificateTemplates/*`. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateTemplate" + } + ]; + + // Optional. A set of X.509 values that will be applied to all issued certificates that + // use this template. If the certificate request includes conflicting values + // for the same properties, they will be overwritten by the values defined + // here. If the issuing [CaPool][google.cloud.security.privateca.v1.CaPool]'s [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] + // defines conflicting + // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values] for the same + // properties, the certificate issuance request will fail. + X509Parameters predefined_values = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes constraints on identities that may be appear in + // [Certificates][google.cloud.security.privateca.v1.Certificate] issued using this template. If this is omitted, + // then this template will not add restrictions on a certificate's identity. + CertificateIdentityConstraints identity_constraints = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the set of X.509 extensions that may appear in a + // [Certificate][google.cloud.security.privateca.v1.Certificate] issued using this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. If a certificate + // request sets extensions that don't appear in the + // [passthrough_extensions][google.cloud.security.privateca.v1.CertificateTemplate.passthrough_extensions], those extensions will be dropped. If the + // issuing [CaPool][google.cloud.security.privateca.v1.CaPool]'s [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] defines + // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values] that don't appear + // here, the certificate issuance request will fail. If this is omitted, then + // this template will not add restrictions on a certificate's X.509 + // extensions. These constraints do not apply to X.509 extensions set in this + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]'s [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]. + CertificateExtensionConstraints passthrough_extensions = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A human-readable description of scenarios this template is intended for. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The time at which this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] was created. + google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] was updated. + google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels with user-defined metadata. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// An [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] is used to describe certain fields of an +// X.509 certificate, such as the key usage fields, fields specific to CA +// certificates, certificate policy extensions and custom extensions. +message X509Parameters { + // Describes values that are relevant in a CA certificate. + message CaOptions { + // Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this + // value is missing, the extension will be omitted from the CA certificate. + optional bool is_ca = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Refers to the path length restriction X.509 extension. For a CA + // certificate, this value describes the depth of subordinate CA + // certificates that are allowed. + // If this value is less than 0, the request will fail. + // If this value is missing, the max path length will be omitted from the + // CA certificate. + optional int32 max_issuer_path_length = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Indicates the intended use for keys that correspond to a certificate. + KeyUsage key_usage = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes options in this [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] that are relevant in a CA + // certificate. + CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes the X.509 certificate policy object identifiers, per + // https://tools.ietf.org/html/rfc5280#section-4.2.1.4. + repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses + // that appear in the "Authority Information Access" extension in the + // certificate. + repeated string aia_ocsp_servers = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Describes custom X.509 extensions. + repeated X509Extension additional_extensions = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Describes a subordinate CA's issuers. This is either a resource name to a +// known issuing [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], or a PEM issuer certificate chain. +message SubordinateConfig { + // This message describes a subordinate CA's issuer certificate chain. This + // wrapper exists for compatibility reasons. + message SubordinateConfigChain { + // Required. Expected to be in leaf-to-root order according to RFC 5246. + repeated string pem_certificates = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof subordinate_config { + // Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the same project that + // was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. This field + // is used for information and usability purposes only. The resource name + // is in the format + // `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string certificate_authority = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. Contains the PEM certificate chain for the issuers of this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], but not pem certificate for this CA itself. + SubordinateConfigChain pem_issuer_chain = 2 [(google.api.field_behavior) = REQUIRED]; + } +} + +// A [PublicKey][google.cloud.security.privateca.v1.PublicKey] describes a public key. +message PublicKey { + // Types of public keys formats that are supported. Currently, only `PEM` + // format is supported. + enum KeyFormat { + // Default unspecified value. + KEY_FORMAT_UNSPECIFIED = 0; + + // The key is PEM-encoded as defined in [RFC + // 7468](https://tools.ietf.org/html/rfc7468). It can be any of the + // following: a PEM-encoded PKCS#1/RFC 3447 RSAPublicKey + // structure, an RFC 5280 + // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) + // or a PEM-encoded X.509 certificate signing request (CSR). If a + // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) + // is specified, it can contain a A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey + // or a NIST P-256/secp256r1/prime256v1 or P-384 key. If a CSR is specified, + // it will used solely for the purpose of extracting the public key. When + // generated by the service, it will always be an RFC 5280 + // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) + // structure containing an algorithm identifier and a key. + PEM = 1; + } + + // Required. A public key. The padding and encoding + // must match with the `KeyFormat` value specified for the `format` field. + bytes key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The format of the public key. + KeyFormat format = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig] describes an X.509 certificate or CSR that is to be +// created, as an alternative to using ASN.1. +message CertificateConfig { + // These values are used to create the distinguished name and subject + // alternative name fields in an X.509 certificate. + message SubjectConfig { + // Required. Contains distinguished name fields such as the common name, location and + // organization. + Subject subject = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The subject alternative name fields. + SubjectAltNames subject_alt_name = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Specifies some of the values in a certificate that are related to the + // subject. + SubjectConfig subject_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Describes how some of the technical X.509 fields in a certificate should be + // populated. + X509Parameters x509_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The public key that corresponds to this config. This is, for example, used + // when issuing [Certificates][google.cloud.security.privateca.v1.Certificate], but not when creating a + // self-signed [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] CSR. + PublicKey public_key = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [CertificateDescription][google.cloud.security.privateca.v1.CertificateDescription] describes an X.509 certificate or CSR that has +// been issued, as an alternative to using ASN.1 / X.509. +message CertificateDescription { + // These values describe fields in an issued X.509 certificate such as the + // distinguished name, subject alternative names, serial number, and lifetime. + message SubjectDescription { + // Contains distinguished name fields such as the common name, location and + // / organization. + Subject subject = 1; + + // The subject alternative name fields. + SubjectAltNames subject_alt_name = 2; + + // The serial number encoded in lowercase hexadecimal. + string hex_serial_number = 3; + + // For convenience, the actual lifetime of an issued certificate. + // Corresponds to 'not_after_time' - 'not_before_time'. + google.protobuf.Duration lifetime = 4; + + // The time at which the certificate becomes valid. + google.protobuf.Timestamp not_before_time = 5; + + // The time at which the certificate expires. + google.protobuf.Timestamp not_after_time = 6; + } + + // A KeyId identifies a specific public key, usually by hashing the public + // key. + message KeyId { + // Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most + // likely the 160 bit SHA-1 hash of the public key. + string key_id = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // A group of fingerprints for the x509 certificate. + message CertificateFingerprint { + // The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate. + string sha256_hash = 1; + } + + // Describes some of the values in a certificate that are related to the + // subject and lifetime. + SubjectDescription subject_description = 1; + + // Describes some of the technical X.509 fields in a certificate. + X509Parameters x509_description = 2; + + // The public key that corresponds to an issued certificate. + PublicKey public_key = 3; + + // Provides a means of identifiying certificates that contain a particular + // public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2. + KeyId subject_key_id = 4; + + // Identifies the subject_key_id of the parent certificate, per + // https://tools.ietf.org/html/rfc5280#section-4.2.1.1 + KeyId authority_key_id = 5; + + // Describes a list of locations to obtain CRL information, i.e. + // the DistributionPoint.fullName described by + // https://tools.ietf.org/html/rfc5280#section-4.2.1.13 + repeated string crl_distribution_points = 6; + + // Describes lists of issuer CA certificate URLs that appear in the + // "Authority Information Access" extension in the certificate. + repeated string aia_issuing_certificate_urls = 7; + + // The hash of the x.509 certificate. + CertificateFingerprint cert_fingerprint = 8; +} + +// An [ObjectId][google.cloud.security.privateca.v1.ObjectId] specifies an object identifier (OID). These provide context +// and describe types in ASN.1 messages. +message ObjectId { + // Required. The parts of an OID path. The most significant parts of the path come + // first. + repeated int32 object_id_path = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// An [X509Extension][google.cloud.security.privateca.v1.X509Extension] specifies an X.509 extension, which may be used in +// different parts of X.509 objects like certificates, CSRs, and CRLs. +message X509Extension { + // Required. The OID for this X.509 extension. + ObjectId object_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Indicates whether or not this extension is critical (i.e., if the client + // does not know how to handle this extension, the client should consider this + // to be an error). + bool critical = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value of this X.509 extension. + bytes value = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A [KeyUsage][google.cloud.security.privateca.v1.KeyUsage] describes key usage values that may appear in an X.509 +// certificate. +message KeyUsage { + // [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions] corresponds to the key usage values + // described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3. + message KeyUsageOptions { + // The key may be used for digital signatures. + bool digital_signature = 1; + + // The key may be used for cryptographic commitments. Note that this may + // also be referred to as "non-repudiation". + bool content_commitment = 2; + + // The key may be used to encipher other keys. + bool key_encipherment = 3; + + // The key may be used to encipher data. + bool data_encipherment = 4; + + // The key may be used in a key agreement protocol. + bool key_agreement = 5; + + // The key may be used to sign certificates. + bool cert_sign = 6; + + // The key may be used sign certificate revocation lists. + bool crl_sign = 7; + + // The key may be used to encipher only. + bool encipher_only = 8; + + // The key may be used to decipher only. + bool decipher_only = 9; + } + + // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to + // certain common OIDs that could be specified as an extended key usage value. + message ExtendedKeyUsageOptions { + // Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW + // server authentication", though regularly used for non-WWW TLS. + bool server_auth = 1; + + // Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW + // client authentication", though regularly used for non-WWW TLS. + bool client_auth = 2; + + // Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of + // downloadable executable code client authentication". + bool code_signing = 3; + + // Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email + // protection". + bool email_protection = 4; + + // Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding + // the hash of an object to a time". + bool time_stamping = 5; + + // Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing + // OCSP responses". + bool ocsp_signing = 6; + } + + // Describes high-level ways in which a key may be used. + KeyUsageOptions base_key_usage = 1; + + // Detailed scenarios in which a key may be used. + ExtendedKeyUsageOptions extended_key_usage = 2; + + // Used to describe extended key usages that are not listed in the + // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions] message. + repeated ObjectId unknown_extended_key_usages = 3; +} + +// [Subject][google.cloud.security.privateca.v1.Subject] describes parts of a distinguished name that, in turn, +// describes the subject of the certificate. +message Subject { + // The "common name" of the subject. + string common_name = 1; + + // The country code of the subject. + string country_code = 2; + + // The organization of the subject. + string organization = 3; + + // The organizational_unit of the subject. + string organizational_unit = 4; + + // The locality or city of the subject. + string locality = 5; + + // The province, territory, or regional state of the subject. + string province = 6; + + // The street address of the subject. + string street_address = 7; + + // The postal code of the subject. + string postal_code = 8; +} + +// [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] corresponds to a more modern way of listing what +// the asserted identity is in a certificate (i.e., compared to the "common +// name" in the distinguished name). +message SubjectAltNames { + // Contains only valid, fully-qualified host names. + repeated string dns_names = 1; + + // Contains only valid RFC 3986 URIs. + repeated string uris = 2; + + // Contains only valid RFC 2822 E-mail addresses. + repeated string email_addresses = 3; + + // Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses. + repeated string ip_addresses = 4; + + // Contains additional subject alternative name values. + repeated X509Extension custom_sans = 5; +} + +// Describes constraints on a [Certificate][google.cloud.security.privateca.v1.Certificate]'s [Subject][google.cloud.security.privateca.v1.Subject] and +// [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames]. +message CertificateIdentityConstraints { + // Optional. A CEL expression that may be used to validate the resolved X.509 Subject + // and/or Subject Alternative Name before a certificate is signed. + // To see the full allowed syntax and some examples, see + // https://cloud.google.com/certificate-authority-service/docs/cel-guide + google.type.Expr cel_expression = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate + // request into the signed certificate. Otherwise, the requested [Subject][google.cloud.security.privateca.v1.Subject] + // will be discarded. + bool allow_subject_passthrough = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a + // certificate request into the signed certificate. Otherwise, the requested + // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be discarded. + bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Describes a set of X.509 extensions that may be part of some certificate +// issuance controls. +message CertificateExtensionConstraints { + // Describes well-known X.509 extensions that can appear in a [Certificate][google.cloud.security.privateca.v1.Certificate], + // not including the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension. + enum KnownCertificateExtension { + // Not specified. + KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED = 0; + + // Refers to a certificate's Key Usage extension, as described in [RFC 5280 + // section 4.2.1.3](https://tools.ietf.org/html/rfc5280#section-4.2.1.3). + // This corresponds to the [KeyUsage.base_key_usage][google.cloud.security.privateca.v1.KeyUsage.base_key_usage] field. + BASE_KEY_USAGE = 1; + + // Refers to a certificate's Extended Key Usage extension, as described in + // [RFC 5280 + // section 4.2.1.12](https://tools.ietf.org/html/rfc5280#section-4.2.1.12). + // This corresponds to the [KeyUsage.extended_key_usage][google.cloud.security.privateca.v1.KeyUsage.extended_key_usage] message. + EXTENDED_KEY_USAGE = 2; + + // Refers to a certificate's Basic Constraints extension, as described in + // [RFC 5280 + // section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9). + // This corresponds to the [X509Parameters.ca_options][google.cloud.security.privateca.v1.X509Parameters.ca_options] field. + CA_OPTIONS = 3; + + // Refers to a certificate's Policy object identifiers, as described in + // [RFC 5280 + // section 4.2.1.4](https://tools.ietf.org/html/rfc5280#section-4.2.1.4). + // This corresponds to the [X509Parameters.policy_ids][google.cloud.security.privateca.v1.X509Parameters.policy_ids] field. + POLICY_IDS = 4; + + // Refers to OCSP servers in a certificate's Authority Information Access + // extension, as described in + // [RFC 5280 + // section 4.2.2.1](https://tools.ietf.org/html/rfc5280#section-4.2.2.1), + // This corresponds to the [X509Parameters.aia_ocsp_servers][google.cloud.security.privateca.v1.X509Parameters.aia_ocsp_servers] field. + AIA_OCSP_SERVERS = 5; + } + + // Optional. A set of named X.509 extensions. Will be combined with + // [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions] to determine the full set of X.509 extensions. + repeated KnownCertificateExtension known_extensions = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId] identifying custom X.509 extensions. + // Will be combined with [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions] to determine the full set of + // X.509 extensions. + repeated ObjectId additional_extensions = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1.Certificate] has been revoked, +// and the reason for revocation. These correspond to standard revocation +// reasons from RFC 5280. Note that the enum labels and values in this +// definition are not the same ASN.1 values defined in RFC 5280. These values +// will be translated to the correct ASN.1 values when a CRL is created. +enum RevocationReason { + // Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1.Certificate] + // has been revoked, but that a reason has not been recorded. + REVOCATION_REASON_UNSPECIFIED = 0; + + // Key material for this [Certificate][google.cloud.security.privateca.v1.Certificate] may have leaked. + KEY_COMPROMISE = 1; + + // The key material for a certificate authority in the issuing path may have + // leaked. + CERTIFICATE_AUTHORITY_COMPROMISE = 2; + + // The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1.Certificate] have changed. + AFFILIATION_CHANGED = 3; + + // This [Certificate][google.cloud.security.privateca.v1.Certificate] has been superseded. + SUPERSEDED = 4; + + // This [Certificate][google.cloud.security.privateca.v1.Certificate] or entities in the issuing path have ceased to + // operate. + CESSATION_OF_OPERATION = 5; + + // This [Certificate][google.cloud.security.privateca.v1.Certificate] should not be considered valid, it is expected that it + // may become valid in the future. + CERTIFICATE_HOLD = 6; + + // This [Certificate][google.cloud.security.privateca.v1.Certificate] no longer has permission to assert the listed + // attributes. + PRIVILEGE_WITHDRAWN = 7; + + // The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1.Certificate] + // may have been compromised. + ATTRIBUTE_AUTHORITY_COMPROMISE = 8; +} + +// Describes the way in which a [Certificate][google.cloud.security.privateca.v1.Certificate]'s [Subject][google.cloud.security.privateca.v1.Subject] and/or +// [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be resolved. +enum SubjectRequestMode { + // Not specified. + SUBJECT_REQUEST_MODE_UNSPECIFIED = 0; + + // The default mode used in most cases. Indicates that the certificate's + // [Subject][google.cloud.security.privateca.v1.Subject] and/or [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] are specified in the certificate + // request. This mode requires the caller to have the + // `privateca.certificates.create` permission. + DEFAULT = 1; + + // A mode reserved for special cases. Indicates that the certificate should + // have one or more SPIFFE [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] set by the service based + // on the caller's identity. This mode will ignore any explicitly specified + // [Subject][google.cloud.security.privateca.v1.Subject] and/or [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] in the certificate request. + // This mode requires the caller to have the + // `privateca.certificates.createReflected` permission. + REFLECTED_SPIFFE = 2; +} diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto new file mode 100644 index 00000000000..f98383ec46d --- /dev/null +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto @@ -0,0 +1,1417 @@ +// 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.security.privateca.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/security/privateca/v1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1;privateca"; +option java_multiple_files = true; +option java_outer_classname = "PrivateCaProto"; +option java_package = "com.google.cloud.security.privateca.v1"; +option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\v1"; +option ruby_package = "Google::Cloud::Security::PrivateCA::v1"; + +// [Certificate Authority +// Service][google.cloud.security.privateca.v1.CertificateAuthorityService] +// manages private certificate authorities and issued certificates. +service CertificateAuthorityService { + option (google.api.default_host) = "privateca.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] + // in a given Project, Location from a particular + // [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc CreateCertificate(CreateCertificateRequest) returns (Certificate) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/caPools/*}/certificates" + body: "certificate" + }; + option (google.api.method_signature) = "parent,certificate,certificate_id"; + } + + // Returns a [Certificate][google.cloud.security.privateca.v1.Certificate]. + rpc GetCertificate(GetCertificateRequest) returns (Certificate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/caPools/*/certificates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [Certificates][google.cloud.security.privateca.v1.Certificate]. + rpc ListCertificates(ListCertificatesRequest) + returns (ListCertificatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/caPools/*}/certificates" + }; + option (google.api.method_signature) = "parent"; + } + + // Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate]. + rpc RevokeCertificate(RevokeCertificateRequest) returns (Certificate) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. + // Currently, the only field you can update is the + // [labels][google.cloud.security.privateca.v1.Certificate.labels] field. + rpc UpdateCertificate(UpdateCertificateRequest) returns (Certificate) { + option (google.api.http) = { + patch: "/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}" + body: "certificate" + }; + option (google.api.method_signature) = "certificate,update_mask"; + } + + // Activate a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // that is in state + // [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] + // and is of type + // [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. + // After the parent Certificate Authority signs a certificate signing request + // from + // [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], + // this method can complete the activation process. + rpc ActivateCertificateAuthority(ActivateCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Create a new + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in a given Project and Location. + rpc CreateCertificateAuthority(CreateCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities" + body: "certificate_authority" + }; + option (google.api.method_signature) = + "parent,certificate_authority,certificate_authority_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Disable a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc DisableCertificateAuthority(DisableCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Enable a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc EnableCertificateAuthority(EnableCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Fetch a certificate signing request (CSR) from a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // that is in state + // [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] + // and is of type + // [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. + // The CSR must then be signed by the desired parent Certificate Authority, + // which could be another + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // resource, or could be an on-prem certificate authority. See also + // [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. + rpc FetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest) + returns (FetchCertificateAuthorityCsrResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc GetCertificateAuthority(GetCertificateAuthorityRequest) + returns (CertificateAuthority) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc ListCertificateAuthorities(ListCertificateAuthoritiesRequest) + returns (ListCertificateAuthoritiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities" + }; + option (google.api.method_signature) = "parent"; + } + + // Undelete a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // that has been deleted. + rpc UndeleteCertificateAuthority(UndeleteCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Delete a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc DeleteCertificateAuthority(DeleteCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Update a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc UpdateCertificateAuthority(UpdateCertificateAuthorityRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" + body: "certificate_authority" + }; + option (google.api.method_signature) = "certificate_authority,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateAuthority" + metadata_type: "OperationMetadata" + }; + } + + // Create a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc CreateCaPool(CreateCaPoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/caPools" + body: "ca_pool" + }; + option (google.api.method_signature) = "parent,ca_pool,ca_pool_id"; + option (google.longrunning.operation_info) = { + response_type: "CaPool" + metadata_type: "OperationMetadata" + }; + } + + // Update a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc UpdateCaPool(UpdateCaPoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{ca_pool.name=projects/*/locations/*/caPools/*}" + body: "ca_pool" + }; + option (google.api.method_signature) = "ca_pool,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CaPool" + metadata_type: "OperationMetadata" + }; + } + + // Returns a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc GetCaPool(GetCaPoolRequest) returns (CaPool) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/caPools/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists [CaPools][google.cloud.security.privateca.v1.CaPool]. + rpc ListCaPools(ListCaPoolsRequest) returns (ListCaPoolsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/caPools" + }; + option (google.api.method_signature) = "parent"; + } + + // Delete a [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc DeleteCaPool(DeleteCaPoolRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/caPools/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "CaPool" + metadata_type: "OperationMetadata" + }; + } + + // FetchCaCerts returns the current trust anchor for the + // [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA + // certificate chains for all ACTIVE + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // resources in the [CaPool][google.cloud.security.privateca.v1.CaPool]. + rpc FetchCaCerts(FetchCaCertsRequest) returns (FetchCaCertsResponse) { + option (google.api.http) = { + post: "/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts" + body: "*" + }; + option (google.api.method_signature) = "ca_pool"; + } + + // Returns a + // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc GetCertificateRevocationList(GetCertificateRevocationListRequest) + returns (CertificateRevocationList) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc ListCertificateRevocationLists(ListCertificateRevocationListsRequest) + returns (ListCertificateRevocationListsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a + // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc UpdateCertificateRevocationList(UpdateCertificateRevocationListRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}" + body: "certificate_revocation_list" + }; + option (google.api.method_signature) = + "certificate_revocation_list,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateRevocationList" + metadata_type: "OperationMetadata" + }; + } + + // Create a new + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + // in a given Project and Location. + rpc CreateCertificateTemplate(CreateCertificateTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/certificateTemplates" + body: "certificate_template" + }; + option (google.api.method_signature) = + "parent,certificate_template,certificate_template_id"; + option (google.longrunning.operation_info) = { + response_type: "CertificateTemplate" + metadata_type: "OperationMetadata" + }; + } + + // DeleteCertificateTemplate deletes a + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc DeleteCertificateTemplate(DeleteCertificateTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/certificateTemplates/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.security.privateca.v1.OperationMetadata" + }; + } + + // Returns a + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc GetCertificateTemplate(GetCertificateTemplateRequest) + returns (CertificateTemplate) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/certificateTemplates/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc ListCertificateTemplates(ListCertificateTemplatesRequest) + returns (ListCertificateTemplatesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/certificateTemplates" + }; + option (google.api.method_signature) = "parent"; + } + + // Update a + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc UpdateCertificateTemplate(UpdateCertificateTemplateRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}" + body: "certificate_template" + }; + option (google.api.method_signature) = "certificate_template,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "CertificateTemplate" + metadata_type: "OperationMetadata" + }; + } +} + +// Request message for +// [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate]. +message CreateCertificateRequest { + // Required. The resource name of the + // [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + // [Certificate][google.cloud.security.privateca.v1.Certificate], in the + // format `projects/*/locations/*/caPools/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; + + // Optional. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the Enterprise + // [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier], but is + // optional and its value is ignored otherwise. + string certificate_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] + // with initial field values. + Certificate certificate = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this is true, no + // [Certificate][google.cloud.security.privateca.v1.Certificate] resource will + // be persisted regardless of the + // [CaPool][google.cloud.security.privateca.v1.CaPool]'s + // [tier][google.cloud.security.privateca.v1.CaPool.tier], and the returned + // [Certificate][google.cloud.security.privateca.v1.Certificate] will not + // contain the + // [pem_certificate][google.cloud.security.privateca.v1.Certificate.pem_certificate] + // field. + bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The resource ID of the + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // that should issue the certificate. This optional field will ignore the + // load-balancing scheme of the Pool and directly issue the certificate from + // the CA with the specified ID, contained in the same + // [CaPool][google.cloud.security.privateca.v1.CaPool] referenced by `parent`. + // Per-CA quota rules apply. If left empty, a + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // will be chosen from the [CaPool][google.cloud.security.privateca.v1.CaPool] + // by the service. For example, to issue a + // [Certificate][google.cloud.security.privateca.v1.Certificate] from a + // Certificate Authority with resource name + // "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", + // you can set the + // [parent][google.cloud.security.privateca.v1.CreateCertificateRequest.parent] + // to "projects/my-project/locations/us-central1/caPools/my-pool" and the + // [issuing_certificate_authority_id][google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id] + // to "my-ca". + string issuing_certificate_authority_id = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate]. +message GetCertificateRequest { + // Required. The [name][google.cloud.security.privateca.v1.Certificate.name] + // of the [Certificate][google.cloud.security.privateca.v1.Certificate] to + // get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates]. +message ListCertificatesRequest { + // Required. The resource name of the location associated with the + // [Certificates][google.cloud.security.privateca.v1.Certificate], in the + // format `projects/*/locations/*/caPools/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; + + // Optional. Limit on the number of + // [Certificates][google.cloud.security.privateca.v1.Certificate] to include + // in the response. Further + // [Certificates][google.cloud.security.privateca.v1.Certificate] can + // subsequently be obtained by including the + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. For + // details on supported filters and syntax, see [Certificates Filtering + // documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. For details on + // supported fields and syntax, see [Certificates Sorting + // documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates]. +message ListCertificatesResponse { + // The list of [Certificates][google.cloud.security.privateca.v1.Certificate]. + repeated Certificate certificates = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificatesRequest.next_page_token][] to retrieve the + // next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate]. +message RevokeCertificateRequest { + // Required. The resource name for this + // [Certificate][google.cloud.security.privateca.v1.Certificate] in the format + // `projects/*/locations/*/caPools/*/certificates/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/Certificate" + } + ]; + + // Required. The + // [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] for + // revoking this certificate. + RevocationReason reason = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate]. +message UpdateCertificateRequest { + // Required. [Certificate][google.cloud.security.privateca.v1.Certificate] + // with updated values. + Certificate certificate = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. +message ActivateCertificateAuthorityRequest { + // Required. The resource name for this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Required. The signed CA certificate issued from + // [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr]. + string pem_ca_certificate = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Must include information about the issuer of + // 'pem_ca_certificate', and any further issuers until the self-signed CA. + SubordinateConfig subordinate_config = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority]. +message CreateCertificateAuthorityRequest { + // Required. The resource name of the + // [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], + // in the format `projects/*/locations/*/caPools/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9_-]{1,63}` + string certificate_authority_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // with initial field values. + CertificateAuthority certificate_authority = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority]. +message DisableCertificateAuthorityRequest { + // Required. The resource name for this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority]. +message EnableCertificateAuthorityRequest { + // Required. The resource name for this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. +message FetchCertificateAuthorityCsrRequest { + // Required. The resource name for this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; +} + +// Response message for +// [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. +message FetchCertificateAuthorityCsrResponse { + // Output only. The PEM-encoded signed certificate signing request (CSR). + string pem_csr = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority]. +message GetCertificateAuthorityRequest { + // Required. The + // [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities]. +message ListCertificateAuthoritiesRequest { + // Required. The resource name of the + // [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], + // in the format `projects/*/locations/*/caPools/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; + + // Optional. Limit on the number of + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] + // to include in the response. Further + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] + // can subsequently be obtained by including the + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities]. +message ListCertificateAuthoritiesResponse { + // The list of + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. + repeated CertificateAuthority certificate_authorities = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next + // page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority]. +message UndeleteCertificateAuthorityRequest { + // Required. The resource name for this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority]. +message DeleteCertificateAuthorityRequest { + // Required. The resource name for this + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. This field allows the CA to be deleted even if the CA has + // active certs. Active certs include both unrevoked and unexpired certs. + bool ignore_active_certificates = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority]. +message UpdateCertificateAuthorityRequest { + // Required. + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // with updated values. + CertificateAuthority certificate_authority = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool]. +message CreateCaPoolRequest { + // Required. The resource name of the location associated with the + // [CaPool][google.cloud.security.privateca.v1.CaPool], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9_-]{1,63}` + string ca_pool_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with + // initial field values. + CaPool ca_pool = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.UpdateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool]. +message UpdateCaPoolRequest { + // Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated + // values. + CaPool ca_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DeleteCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool]. +message DeleteCaPoolRequest { + // Required. The resource name for this + // [CaPool][google.cloud.security.privateca.v1.CaPool] in the format + // `projects/*/locations/*/caPools/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts]. +message FetchCaCertsRequest { + // Required. The resource name for the + // [CaPool][google.cloud.security.privateca.v1.CaPool] in the format + // `projects/*/locations/*/caPools/*`. + string ca_pool = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts]. +message FetchCaCertsResponse { + message CertChain { + // The certificates that form the CA chain, from leaf to root order. + repeated string certificates = 1; + } + + // The PEM encoded CA certificate chains of all + // [ACTIVE][CertificateAuthority.State.ACTIVE] + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // resources in this [CaPool][google.cloud.security.privateca.v1.CaPool]. + repeated CertChain ca_certs = 1; +} + +// Request message for +// [CertificateAuthorityService.GetCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool]. +message GetCaPoolRequest { + // Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the + // [CaPool][google.cloud.security.privateca.v1.CaPool] to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCaPools][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools]. +message ListCaPoolsRequest { + // Required. The resource name of the location associated with the + // [CaPools][google.cloud.security.privateca.v1.CaPool], in the format + // `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Limit on the number of + // [CaPools][google.cloud.security.privateca.v1.CaPool] to include in the + // response. Further [CaPools][google.cloud.security.privateca.v1.CaPool] can + // subsequently be obtained by including the + // [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCaPools][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools]. +message ListCaPoolsResponse { + // The list of [CaPools][google.cloud.security.privateca.v1.CaPool]. + repeated CaPool ca_pools = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateAuthoritiesRequest.next_page_token][] to retrieve the next + // page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList]. +message GetCertificateRevocationListRequest { + // Required. The + // [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] + // of the + // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] + // to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateRevocationList" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists]. +message ListCertificateRevocationListsRequest { + // Required. The resource name of the location associated with the + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], + // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateAuthority" + } + ]; + + // Optional. Limit on the number of + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] + // to include in the response. Further + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] + // can subsequently be obtained by including the + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists]. +message ListCertificateRevocationListsResponse { + // The list of + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. + repeated CertificateRevocationList certificate_revocation_lists = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateRevocationListsRequest.next_page_token][] to retrieve the + // next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList]. +message UpdateCertificateRevocationListRequest { + // Required. + // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] + // with updated values. + CertificateRevocationList certificate_revocation_list = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.CreateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate]. +message CreateCertificateTemplateRequest { + // Required. The resource name of the location associated with the + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], + // in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. It must be unique within a location and match the regular + // expression `[a-zA-Z0-9_-]{1,63}` + string certificate_template_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. A + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + // with initial field values. + CertificateTemplate certificate_template = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.DeleteCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate]. +message DeleteCertificateTemplateRequest { + // Required. The resource name for this + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + // in the format `projects/*/locations/*/certificateTemplates/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateTemplate" + } + ]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for +// [CertificateAuthorityService.GetCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate]. +message GetCertificateTemplateRequest { + // Required. The + // [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + // to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "privateca.googleapis.com/CertificateTemplate" + } + ]; +} + +// Request message for +// [CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates]. +message ListCertificateTemplatesRequest { + // Required. The resource name of the location associated with the + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], + // in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Limit on the number of + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] + // to include in the response. Further + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] + // can subsequently be obtained by including the + // [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token] + // in a subsequent request. If unspecified, the server will pick an + // appropriate default. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Pagination token, returned earlier via + // [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token]. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Only include resources that match the filter in the response. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specify how the results should be sorted. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for +// [CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates]. +message ListCertificateTemplatesResponse { + // The list of + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. + repeated CertificateTemplate certificate_templates = 1; + + // A token to retrieve next page of results. Pass this value in + // [ListCertificateTemplatesRequest.next_page_token][] to retrieve + // the next page of results. + string next_page_token = 2; + + // A list of locations (e.g. "us-west1") that could not be reached. + repeated string unreachable = 3; +} + +// Request message for +// [CertificateAuthorityService.UpdateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate]. +message UpdateCertificateTemplateRequest { + // Required. + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] + // with updated values. + CertificateTemplate certificate_template = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. A list of fields to be updated in this request. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. An ID to identify requests. Specify a unique request ID so that + // if you must retry your request, the server will know to ignore the request + // if it has already been completed. The server will guarantee that for at + // least 60 minutes since the first request. + // + // For example, consider a situation where you make an initial request and t + // he request times out. If you make the request again with the same request + // ID, the server can check if original operation with the same request ID + // was received, and if so, will ignore the second request. This prevents + // clients from accidentally creating duplicate commitments. + // + // The request ID must be a valid UUID with the exception that zero UUID is + // not supported (00000000-0000-0000-0000-000000000000). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Represents the metadata of the long-running operation. +message OperationMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Server-defined resource path for the target of the operation. + string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Name of the verb executed by the operation. + string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Human-readable status of the operation, if any. + string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Identifies whether the user has requested cancellation + // of the operation. Operations that have successfully been cancelled + // have [Operation.error][] value with a + // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + // `Code.CANCELLED`. + bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. API version used to start the operation. + string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index 0e5e758bc0e..f4a4aee6358 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -26,8 +26,8 @@ export namespace google { /** Namespace privateca. */ namespace privateca { - /** Namespace v1beta1. */ - namespace v1beta1 { + /** Namespace v1. */ + namespace v1 { /** Properties of a CertificateAuthority. */ interface ICertificateAuthority { @@ -36,43 +36,37 @@ export namespace google { name?: (string|null); /** CertificateAuthority type */ - type?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|null); - - /** CertificateAuthority tier */ - tier?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|null); + type?: (google.cloud.security.privateca.v1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.Type|null); /** CertificateAuthority config */ - config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + config?: (google.cloud.security.privateca.v1.ICertificateConfig|null); /** CertificateAuthority lifetime */ lifetime?: (google.protobuf.IDuration|null); /** CertificateAuthority keySpec */ - keySpec?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null); - - /** CertificateAuthority certificatePolicy */ - certificatePolicy?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null); - - /** CertificateAuthority issuingOptions */ - issuingOptions?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null); + keySpec?: (google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec|null); /** CertificateAuthority subordinateConfig */ - subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + subordinateConfig?: (google.cloud.security.privateca.v1.ISubordinateConfig|null); + + /** CertificateAuthority tier */ + tier?: (google.cloud.security.privateca.v1.CaPool.Tier|keyof typeof google.cloud.security.privateca.v1.CaPool.Tier|null); /** CertificateAuthority state */ - state?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.State|null); + state?: (google.cloud.security.privateca.v1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.State|null); /** CertificateAuthority pemCaCertificates */ pemCaCertificates?: (string[]|null); /** CertificateAuthority caCertificateDescriptions */ - caCertificateDescriptions?: (google.cloud.security.privateca.v1beta1.ICertificateDescription[]|null); + caCertificateDescriptions?: (google.cloud.security.privateca.v1.ICertificateDescription[]|null); /** CertificateAuthority gcsBucket */ gcsBucket?: (string|null); /** CertificateAuthority accessUrls */ - accessUrls?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null); + accessUrls?: (google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls|null); /** CertificateAuthority createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -83,6 +77,9 @@ export namespace google { /** CertificateAuthority deleteTime */ deleteTime?: (google.protobuf.ITimestamp|null); + /** CertificateAuthority expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + /** CertificateAuthority labels */ labels?: ({ [k: string]: string }|null); } @@ -94,49 +91,43 @@ export namespace google { * Constructs a new CertificateAuthority. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificateAuthority); + constructor(properties?: google.cloud.security.privateca.v1.ICertificateAuthority); /** CertificateAuthority name. */ public name: string; /** CertificateAuthority type. */ - public type: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Type); - - /** CertificateAuthority tier. */ - public tier: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier); + public type: (google.cloud.security.privateca.v1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.Type); /** CertificateAuthority config. */ - public config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + public config?: (google.cloud.security.privateca.v1.ICertificateConfig|null); /** CertificateAuthority lifetime. */ public lifetime?: (google.protobuf.IDuration|null); /** CertificateAuthority keySpec. */ - public keySpec?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null); - - /** CertificateAuthority certificatePolicy. */ - public certificatePolicy?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null); - - /** CertificateAuthority issuingOptions. */ - public issuingOptions?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null); + public keySpec?: (google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec|null); /** CertificateAuthority subordinateConfig. */ - public subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + public subordinateConfig?: (google.cloud.security.privateca.v1.ISubordinateConfig|null); + + /** CertificateAuthority tier. */ + public tier: (google.cloud.security.privateca.v1.CaPool.Tier|keyof typeof google.cloud.security.privateca.v1.CaPool.Tier); /** CertificateAuthority state. */ - public state: (google.cloud.security.privateca.v1beta1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.State); + public state: (google.cloud.security.privateca.v1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.State); /** CertificateAuthority pemCaCertificates. */ public pemCaCertificates: string[]; /** CertificateAuthority caCertificateDescriptions. */ - public caCertificateDescriptions: google.cloud.security.privateca.v1beta1.ICertificateDescription[]; + public caCertificateDescriptions: google.cloud.security.privateca.v1.ICertificateDescription[]; /** CertificateAuthority gcsBucket. */ public gcsBucket: string; /** CertificateAuthority accessUrls. */ - public accessUrls?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null); + public accessUrls?: (google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls|null); /** CertificateAuthority createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -147,6 +138,9 @@ export namespace google { /** CertificateAuthority deleteTime. */ public deleteTime?: (google.protobuf.ITimestamp|null); + /** CertificateAuthority expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + /** CertificateAuthority labels. */ public labels: { [k: string]: string }; @@ -155,23 +149,23 @@ export namespace google { * @param [properties] Properties to set * @returns CertificateAuthority instance */ - public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificateAuthority): google.cloud.security.privateca.v1beta1.CertificateAuthority; + public static create(properties?: google.cloud.security.privateca.v1.ICertificateAuthority): google.cloud.security.privateca.v1.CertificateAuthority; /** - * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.verify|verify} messages. * @param message CertificateAuthority message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.security.privateca.v1beta1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.security.privateca.v1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.verify|verify} messages. * @param message CertificateAuthority message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CertificateAuthority message from the specified reader or buffer. @@ -181,7 +175,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateAuthority; /** * Decodes a CertificateAuthority message from the specified reader or buffer, length delimited. @@ -190,7 +184,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateAuthority; /** * Verifies a CertificateAuthority message. @@ -204,7 +198,7 @@ export namespace google { * @param object Plain object * @returns CertificateAuthority */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority; + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateAuthority; /** * Creates a plain object from a CertificateAuthority message. Also converts values to other types if specified. @@ -212,7 +206,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.security.privateca.v1.CertificateAuthority, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this CertificateAuthority to JSON. @@ -223,262 +217,8661 @@ export namespace google { namespace CertificateAuthority { - /** Properties of an IssuingOptions. */ - interface IIssuingOptions { + /** Properties of an AccessUrls. */ + interface IAccessUrls { - /** IssuingOptions includeCaCertUrl */ - includeCaCertUrl?: (boolean|null); + /** AccessUrls caCertificateAccessUrl */ + caCertificateAccessUrl?: (string|null); - /** IssuingOptions includeCrlAccessUrl */ - includeCrlAccessUrl?: (boolean|null); + /** AccessUrls crlAccessUrls */ + crlAccessUrls?: (string[]|null); } - /** Represents an IssuingOptions. */ - class IssuingOptions implements IIssuingOptions { + /** Represents an AccessUrls. */ + class AccessUrls implements IAccessUrls { /** - * Constructs a new IssuingOptions. + * Constructs a new AccessUrls. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions); + constructor(properties?: google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls); - /** IssuingOptions includeCaCertUrl. */ - public includeCaCertUrl: boolean; + /** AccessUrls caCertificateAccessUrl. */ + public caCertificateAccessUrl: string; - /** IssuingOptions includeCrlAccessUrl. */ - public includeCrlAccessUrl: boolean; + /** AccessUrls crlAccessUrls. */ + public crlAccessUrls: string[]; /** - * Creates a new IssuingOptions instance using the specified properties. + * Creates a new AccessUrls instance using the specified properties. * @param [properties] Properties to set - * @returns IssuingOptions instance + * @returns AccessUrls instance */ - public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + public static create(properties?: google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls): google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls; /** - * Encodes the specified IssuingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. - * @param message IssuingOptions message or plain object to encode + * Encodes the specified AccessUrls message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.verify|verify} messages. + * @param message AccessUrls message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified IssuingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. - * @param message IssuingOptions message or plain object to encode + * Encodes the specified AccessUrls message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.verify|verify} messages. + * @param message AccessUrls message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an IssuingOptions message from the specified reader or buffer. + * Decodes an AccessUrls message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns IssuingOptions + * @returns AccessUrls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls; /** - * Decodes an IssuingOptions message from the specified reader or buffer, length delimited. + * Decodes an AccessUrls message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns IssuingOptions + * @returns AccessUrls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls; /** - * Verifies an IssuingOptions message. + * Verifies an AccessUrls message. * @param message Plain 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 IssuingOptions message from a plain object. Also converts values to their respective internal types. + * Creates an AccessUrls message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns IssuingOptions + * @returns AccessUrls */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls; /** - * Creates a plain object from an IssuingOptions message. Also converts values to other types if specified. - * @param message IssuingOptions + * Creates a plain object from an AccessUrls message. Also converts values to other types if specified. + * @param message AccessUrls * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this IssuingOptions to JSON. + * Converts this AccessUrls to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CertificateAuthorityPolicy. */ - interface ICertificateAuthorityPolicy { - - /** CertificateAuthorityPolicy allowedConfigList */ - allowedConfigList?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null); - - /** CertificateAuthorityPolicy overwriteConfigValues */ - overwriteConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); - - /** CertificateAuthorityPolicy allowedLocationsAndOrganizations */ - allowedLocationsAndOrganizations?: (google.cloud.security.privateca.v1beta1.ISubject[]|null); - - /** CertificateAuthorityPolicy allowedCommonNames */ - allowedCommonNames?: (string[]|null); - - /** CertificateAuthorityPolicy allowedSans */ - allowedSans?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null); + /** Properties of a KeyVersionSpec. */ + interface IKeyVersionSpec { - /** CertificateAuthorityPolicy maximumLifetime */ - maximumLifetime?: (google.protobuf.IDuration|null); + /** KeyVersionSpec cloudKmsKeyVersion */ + cloudKmsKeyVersion?: (string|null); - /** CertificateAuthorityPolicy allowedIssuanceModes */ - allowedIssuanceModes?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null); + /** KeyVersionSpec algorithm */ + algorithm?: (google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|null); } - /** Represents a CertificateAuthorityPolicy. */ - class CertificateAuthorityPolicy implements ICertificateAuthorityPolicy { + /** Represents a KeyVersionSpec. */ + class KeyVersionSpec implements IKeyVersionSpec { /** - * Constructs a new CertificateAuthorityPolicy. + * Constructs a new KeyVersionSpec. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy); - - /** CertificateAuthorityPolicy allowedConfigList. */ - public allowedConfigList?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null); - - /** CertificateAuthorityPolicy overwriteConfigValues. */ - public overwriteConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); - - /** CertificateAuthorityPolicy allowedLocationsAndOrganizations. */ - public allowedLocationsAndOrganizations: google.cloud.security.privateca.v1beta1.ISubject[]; + constructor(properties?: google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec); - /** CertificateAuthorityPolicy allowedCommonNames. */ - public allowedCommonNames: string[]; - - /** CertificateAuthorityPolicy allowedSans. */ - public allowedSans?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null); - - /** CertificateAuthorityPolicy maximumLifetime. */ - public maximumLifetime?: (google.protobuf.IDuration|null); + /** KeyVersionSpec cloudKmsKeyVersion. */ + public cloudKmsKeyVersion: string; - /** CertificateAuthorityPolicy allowedIssuanceModes. */ - public allowedIssuanceModes?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null); + /** KeyVersionSpec algorithm. */ + public algorithm: (google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm); - /** CertificateAuthorityPolicy configPolicy. */ - public configPolicy?: ("allowedConfigList"|"overwriteConfigValues"); + /** KeyVersionSpec KeyVersion. */ + public KeyVersion?: ("cloudKmsKeyVersion"|"algorithm"); /** - * Creates a new CertificateAuthorityPolicy instance using the specified properties. + * Creates a new KeyVersionSpec instance using the specified properties. * @param [properties] Properties to set - * @returns CertificateAuthorityPolicy instance + * @returns KeyVersionSpec instance */ - public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + public static create(properties?: google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec): google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec; /** - * Encodes the specified CertificateAuthorityPolicy message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. - * @param message CertificateAuthorityPolicy message or plain object to encode + * Encodes the specified KeyVersionSpec message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @param message KeyVersionSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CertificateAuthorityPolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. - * @param message CertificateAuthorityPolicy message or plain object to encode + * Encodes the specified KeyVersionSpec message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @param message KeyVersionSpec message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer. + * Decodes a KeyVersionSpec message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CertificateAuthorityPolicy + * @returns KeyVersionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec; /** - * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer, length delimited. + * Decodes a KeyVersionSpec message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CertificateAuthorityPolicy + * @returns KeyVersionSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec; /** - * Verifies a CertificateAuthorityPolicy message. + * Verifies a KeyVersionSpec message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CertificateAuthorityPolicy message from a plain object. Also converts values to their respective internal types. + * Creates a KeyVersionSpec message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CertificateAuthorityPolicy + * @returns KeyVersionSpec */ - public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec; /** - * Creates a plain object from a CertificateAuthorityPolicy message. Also converts values to other types if specified. - * @param message CertificateAuthorityPolicy + * Creates a plain object from a KeyVersionSpec message. Also converts values to other types if specified. + * @param message KeyVersionSpec * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CertificateAuthorityPolicy to JSON. + * Converts this KeyVersionSpec to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace CertificateAuthorityPolicy { + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SELF_SIGNED = 1, + SUBORDINATE = 2 + } - /** Properties of an AllowedConfigList. */ - interface IAllowedConfigList { + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + STAGED = 3, + AWAITING_USER_ACTIVATION = 4, + DELETED = 5 + } - /** AllowedConfigList allowedConfigValues */ - allowedConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper[]|null); - } + /** SignHashAlgorithm enum. */ + enum SignHashAlgorithm { + SIGN_HASH_ALGORITHM_UNSPECIFIED = 0, + RSA_PSS_2048_SHA256 = 1, + RSA_PSS_3072_SHA256 = 2, + RSA_PSS_4096_SHA256 = 3, + RSA_PKCS1_2048_SHA256 = 6, + RSA_PKCS1_3072_SHA256 = 7, + RSA_PKCS1_4096_SHA256 = 8, + EC_P256_SHA256 = 4, + EC_P384_SHA384 = 5 + } + } - /** Represents an AllowedConfigList. */ - class AllowedConfigList implements IAllowedConfigList { + /** Properties of a CaPool. */ + interface ICaPool { - /** - * Constructs a new AllowedConfigList. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList); + /** CaPool name */ + name?: (string|null); - /** AllowedConfigList allowedConfigValues. */ - public allowedConfigValues: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper[]; + /** CaPool tier */ + tier?: (google.cloud.security.privateca.v1.CaPool.Tier|keyof typeof google.cloud.security.privateca.v1.CaPool.Tier|null); - /** - * Creates a new AllowedConfigList instance using the specified properties. - * @param [properties] Properties to set - * @returns AllowedConfigList instance - */ - public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList; + /** CaPool issuancePolicy */ + issuancePolicy?: (google.cloud.security.privateca.v1.CaPool.IIssuancePolicy|null); - /** - * Encodes the specified AllowedConfigList message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify|verify} messages. - * @param message AllowedConfigList message or plain object to encode + /** CaPool publishingOptions */ + publishingOptions?: (google.cloud.security.privateca.v1.CaPool.IPublishingOptions|null); + + /** CaPool labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a CaPool. */ + class CaPool implements ICaPool { + + /** + * Constructs a new CaPool. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICaPool); + + /** CaPool name. */ + public name: string; + + /** CaPool tier. */ + public tier: (google.cloud.security.privateca.v1.CaPool.Tier|keyof typeof google.cloud.security.privateca.v1.CaPool.Tier); + + /** CaPool issuancePolicy. */ + public issuancePolicy?: (google.cloud.security.privateca.v1.CaPool.IIssuancePolicy|null); + + /** CaPool publishingOptions. */ + public publishingOptions?: (google.cloud.security.privateca.v1.CaPool.IPublishingOptions|null); + + /** CaPool labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new CaPool instance using the specified properties. + * @param [properties] Properties to set + * @returns CaPool instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICaPool): google.cloud.security.privateca.v1.CaPool; + + /** + * Encodes the specified CaPool message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.verify|verify} messages. + * @param message CaPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICaPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaPool message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.verify|verify} messages. + * @param message CaPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICaPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaPool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool; + + /** + * Decodes a CaPool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool; + + /** + * Verifies a CaPool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CaPool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaPool + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool; + + /** + * Creates a plain object from a CaPool message. Also converts values to other types if specified. + * @param message CaPool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaPool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CaPool { + + /** Properties of a PublishingOptions. */ + interface IPublishingOptions { + + /** PublishingOptions publishCaCert */ + publishCaCert?: (boolean|null); + + /** PublishingOptions publishCrl */ + publishCrl?: (boolean|null); + } + + /** Represents a PublishingOptions. */ + class PublishingOptions implements IPublishingOptions { + + /** + * Constructs a new PublishingOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CaPool.IPublishingOptions); + + /** PublishingOptions publishCaCert. */ + public publishCaCert: boolean; + + /** PublishingOptions publishCrl. */ + public publishCrl: boolean; + + /** + * Creates a new PublishingOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishingOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CaPool.IPublishingOptions): google.cloud.security.privateca.v1.CaPool.PublishingOptions; + + /** + * Encodes the specified PublishingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.PublishingOptions.verify|verify} messages. + * @param message PublishingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CaPool.IPublishingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.PublishingOptions.verify|verify} messages. + * @param message PublishingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CaPool.IPublishingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishingOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool.PublishingOptions; + + /** + * Decodes a PublishingOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool.PublishingOptions; + + /** + * Verifies a PublishingOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishingOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishingOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool.PublishingOptions; + + /** + * Creates a plain object from a PublishingOptions message. Also converts values to other types if specified. + * @param message PublishingOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool.PublishingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishingOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an IssuancePolicy. */ + interface IIssuancePolicy { + + /** IssuancePolicy allowedKeyTypes */ + allowedKeyTypes?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType[]|null); + + /** IssuancePolicy maximumLifetime */ + maximumLifetime?: (google.protobuf.IDuration|null); + + /** IssuancePolicy allowedIssuanceModes */ + allowedIssuanceModes?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes|null); + + /** IssuancePolicy baselineValues */ + baselineValues?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** IssuancePolicy identityConstraints */ + identityConstraints?: (google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null); + + /** IssuancePolicy passthroughExtensions */ + passthroughExtensions?: (google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null); + } + + /** Represents an IssuancePolicy. */ + class IssuancePolicy implements IIssuancePolicy { + + /** + * Constructs a new IssuancePolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CaPool.IIssuancePolicy); + + /** IssuancePolicy allowedKeyTypes. */ + public allowedKeyTypes: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType[]; + + /** IssuancePolicy maximumLifetime. */ + public maximumLifetime?: (google.protobuf.IDuration|null); + + /** IssuancePolicy allowedIssuanceModes. */ + public allowedIssuanceModes?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes|null); + + /** IssuancePolicy baselineValues. */ + public baselineValues?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** IssuancePolicy identityConstraints. */ + public identityConstraints?: (google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null); + + /** IssuancePolicy passthroughExtensions. */ + public passthroughExtensions?: (google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null); + + /** + * Creates a new IssuancePolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IssuancePolicy instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CaPool.IIssuancePolicy): google.cloud.security.privateca.v1.CaPool.IssuancePolicy; + + /** + * Encodes the specified IssuancePolicy message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.verify|verify} messages. + * @param message IssuancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CaPool.IIssuancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssuancePolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.verify|verify} messages. + * @param message IssuancePolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CaPool.IIssuancePolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssuancePolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssuancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool.IssuancePolicy; + + /** + * Decodes an IssuancePolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssuancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool.IssuancePolicy; + + /** + * Verifies an IssuancePolicy message. + * @param message Plain 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 IssuancePolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssuancePolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool.IssuancePolicy; + + /** + * Creates a plain object from an IssuancePolicy message. Also converts values to other types if specified. + * @param message IssuancePolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssuancePolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace IssuancePolicy { + + /** Properties of an AllowedKeyType. */ + interface IAllowedKeyType { + + /** AllowedKeyType rsa */ + rsa?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null); + + /** AllowedKeyType ellipticCurve */ + ellipticCurve?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|keyof typeof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|null); + } + + /** Represents an AllowedKeyType. */ + class AllowedKeyType implements IAllowedKeyType { + + /** + * Constructs a new AllowedKeyType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType); + + /** AllowedKeyType rsa. */ + public rsa?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null); + + /** AllowedKeyType ellipticCurve. */ + public ellipticCurve: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|keyof typeof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve); + + /** AllowedKeyType keyType. */ + public keyType?: ("rsa"|"ellipticCurve"); + + /** + * Creates a new AllowedKeyType instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedKeyType instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType; + + /** + * Encodes the specified AllowedKeyType message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.verify|verify} messages. + * @param message AllowedKeyType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedKeyType message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.verify|verify} messages. + * @param message AllowedKeyType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedKeyType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType; + + /** + * Decodes an AllowedKeyType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType; + + /** + * Verifies an AllowedKeyType message. + * @param message Plain 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 AllowedKeyType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedKeyType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType; + + /** + * Creates a plain object from an AllowedKeyType message. Also converts values to other types if specified. + * @param message AllowedKeyType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedKeyType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace AllowedKeyType { + + /** Properties of a RsaKeyType. */ + interface IRsaKeyType { + + /** RsaKeyType minModulusSize */ + minModulusSize?: (number|Long|string|null); + + /** RsaKeyType maxModulusSize */ + maxModulusSize?: (number|Long|string|null); + } + + /** Represents a RsaKeyType. */ + class RsaKeyType implements IRsaKeyType { + + /** + * Constructs a new RsaKeyType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType); + + /** RsaKeyType minModulusSize. */ + public minModulusSize: (number|Long|string); + + /** RsaKeyType maxModulusSize. */ + public maxModulusSize: (number|Long|string); + + /** + * Creates a new RsaKeyType instance using the specified properties. + * @param [properties] Properties to set + * @returns RsaKeyType instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType; + + /** + * Encodes the specified RsaKeyType message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.verify|verify} messages. + * @param message RsaKeyType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RsaKeyType message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.verify|verify} messages. + * @param message RsaKeyType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RsaKeyType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RsaKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType; + + /** + * Decodes a RsaKeyType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RsaKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType; + + /** + * Verifies a RsaKeyType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RsaKeyType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RsaKeyType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType; + + /** + * Creates a plain object from a RsaKeyType message. Also converts values to other types if specified. + * @param message RsaKeyType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RsaKeyType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** NamedCurve enum. */ + enum NamedCurve { + NAMED_CURVE_UNSPECIFIED = 0, + ECDSA_P256 = 2, + ECDSA_P384 = 3, + EDDSA_25519 = 4 + } + } + + /** Properties of an IssuanceModes. */ + interface IIssuanceModes { + + /** IssuanceModes allowCsrBasedIssuance */ + allowCsrBasedIssuance?: (boolean|null); + + /** IssuanceModes allowConfigBasedIssuance */ + allowConfigBasedIssuance?: (boolean|null); + } + + /** Represents an IssuanceModes. */ + class IssuanceModes implements IIssuanceModes { + + /** + * Constructs a new IssuanceModes. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes); + + /** IssuanceModes allowCsrBasedIssuance. */ + public allowCsrBasedIssuance: boolean; + + /** IssuanceModes allowConfigBasedIssuance. */ + public allowConfigBasedIssuance: boolean; + + /** + * Creates a new IssuanceModes instance using the specified properties. + * @param [properties] Properties to set + * @returns IssuanceModes instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes; + + /** + * Encodes the specified IssuanceModes message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.verify|verify} messages. + * @param message IssuanceModes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssuanceModes message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.verify|verify} messages. + * @param message IssuanceModes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes; + + /** + * Verifies an IssuanceModes message. + * @param message Plain 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 IssuanceModes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssuanceModes + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes; + + /** + * Creates a plain object from an IssuanceModes message. Also converts values to other types if specified. + * @param message IssuanceModes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssuanceModes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + ENTERPRISE = 1, + DEVOPS = 2 + } + } + + /** Properties of a CertificateRevocationList. */ + interface ICertificateRevocationList { + + /** CertificateRevocationList name */ + name?: (string|null); + + /** CertificateRevocationList sequenceNumber */ + sequenceNumber?: (number|Long|string|null); + + /** CertificateRevocationList revokedCertificates */ + revokedCertificates?: (google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate[]|null); + + /** CertificateRevocationList pemCrl */ + pemCrl?: (string|null); + + /** CertificateRevocationList accessUrl */ + accessUrl?: (string|null); + + /** CertificateRevocationList state */ + state?: (google.cloud.security.privateca.v1.CertificateRevocationList.State|keyof typeof google.cloud.security.privateca.v1.CertificateRevocationList.State|null); + + /** CertificateRevocationList createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList revisionId */ + revisionId?: (string|null); + + /** CertificateRevocationList labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a CertificateRevocationList. */ + class CertificateRevocationList implements ICertificateRevocationList { + + /** + * Constructs a new CertificateRevocationList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificateRevocationList); + + /** CertificateRevocationList name. */ + public name: string; + + /** CertificateRevocationList sequenceNumber. */ + public sequenceNumber: (number|Long|string); + + /** CertificateRevocationList revokedCertificates. */ + public revokedCertificates: google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate[]; + + /** CertificateRevocationList pemCrl. */ + public pemCrl: string; + + /** CertificateRevocationList accessUrl. */ + public accessUrl: string; + + /** CertificateRevocationList state. */ + public state: (google.cloud.security.privateca.v1.CertificateRevocationList.State|keyof typeof google.cloud.security.privateca.v1.CertificateRevocationList.State); + + /** CertificateRevocationList createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateRevocationList revisionId. */ + public revisionId: string; + + /** CertificateRevocationList labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new CertificateRevocationList instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateRevocationList instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificateRevocationList): google.cloud.security.privateca.v1.CertificateRevocationList; + + /** + * Encodes the specified CertificateRevocationList message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.verify|verify} messages. + * @param message CertificateRevocationList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificateRevocationList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateRevocationList message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.verify|verify} messages. + * @param message CertificateRevocationList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateRevocationList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateRevocationList; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateRevocationList; + + /** + * Verifies a CertificateRevocationList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateRevocationList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateRevocationList + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateRevocationList; + + /** + * Creates a plain object from a CertificateRevocationList message. Also converts values to other types if specified. + * @param message CertificateRevocationList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateRevocationList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateRevocationList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateRevocationList { + + /** Properties of a RevokedCertificate. */ + interface IRevokedCertificate { + + /** RevokedCertificate certificate */ + certificate?: (string|null); + + /** RevokedCertificate hexSerialNumber */ + hexSerialNumber?: (string|null); + + /** RevokedCertificate revocationReason */ + revocationReason?: (google.cloud.security.privateca.v1.RevocationReason|keyof typeof google.cloud.security.privateca.v1.RevocationReason|null); + } + + /** Represents a RevokedCertificate. */ + class RevokedCertificate implements IRevokedCertificate { + + /** + * Constructs a new RevokedCertificate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate); + + /** RevokedCertificate certificate. */ + public certificate: string; + + /** RevokedCertificate hexSerialNumber. */ + public hexSerialNumber: string; + + /** RevokedCertificate revocationReason. */ + public revocationReason: (google.cloud.security.privateca.v1.RevocationReason|keyof typeof google.cloud.security.privateca.v1.RevocationReason); + + /** + * Creates a new RevokedCertificate instance using the specified properties. + * @param [properties] Properties to set + * @returns RevokedCertificate instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate): google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate; + + /** + * Encodes the specified RevokedCertificate message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @param message RevokedCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevokedCertificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @param message RevokedCertificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate; + + /** + * Verifies a RevokedCertificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevokedCertificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevokedCertificate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate; + + /** + * Creates a plain object from a RevokedCertificate message. Also converts values to other types if specified. + * @param message RevokedCertificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevokedCertificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + SUPERSEDED = 2 + } + } + + /** Properties of a Certificate. */ + interface ICertificate { + + /** Certificate name */ + name?: (string|null); + + /** Certificate pemCsr */ + pemCsr?: (string|null); + + /** Certificate config */ + config?: (google.cloud.security.privateca.v1.ICertificateConfig|null); + + /** Certificate issuerCertificateAuthority */ + issuerCertificateAuthority?: (string|null); + + /** Certificate lifetime */ + lifetime?: (google.protobuf.IDuration|null); + + /** Certificate certificateTemplate */ + certificateTemplate?: (string|null); + + /** Certificate subjectMode */ + subjectMode?: (google.cloud.security.privateca.v1.SubjectRequestMode|keyof typeof google.cloud.security.privateca.v1.SubjectRequestMode|null); + + /** Certificate revocationDetails */ + revocationDetails?: (google.cloud.security.privateca.v1.Certificate.IRevocationDetails|null); + + /** Certificate pemCertificate */ + pemCertificate?: (string|null); + + /** Certificate certificateDescription */ + certificateDescription?: (google.cloud.security.privateca.v1.ICertificateDescription|null); + + /** Certificate pemCertificateChain */ + pemCertificateChain?: (string[]|null); + + /** Certificate createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Certificate updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Certificate labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Certificate. */ + class Certificate implements ICertificate { + + /** + * Constructs a new Certificate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificate); + + /** Certificate name. */ + public name: string; + + /** Certificate pemCsr. */ + public pemCsr: string; + + /** Certificate config. */ + public config?: (google.cloud.security.privateca.v1.ICertificateConfig|null); + + /** Certificate issuerCertificateAuthority. */ + public issuerCertificateAuthority: string; + + /** Certificate lifetime. */ + public lifetime?: (google.protobuf.IDuration|null); + + /** Certificate certificateTemplate. */ + public certificateTemplate: string; + + /** Certificate subjectMode. */ + public subjectMode: (google.cloud.security.privateca.v1.SubjectRequestMode|keyof typeof google.cloud.security.privateca.v1.SubjectRequestMode); + + /** Certificate revocationDetails. */ + public revocationDetails?: (google.cloud.security.privateca.v1.Certificate.IRevocationDetails|null); + + /** Certificate pemCertificate. */ + public pemCertificate: string; + + /** Certificate certificateDescription. */ + public certificateDescription?: (google.cloud.security.privateca.v1.ICertificateDescription|null); + + /** Certificate pemCertificateChain. */ + public pemCertificateChain: string[]; + + /** Certificate createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Certificate updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Certificate labels. */ + public labels: { [k: string]: string }; + + /** Certificate certificateConfig. */ + public certificateConfig?: ("pemCsr"|"config"); + + /** + * Creates a new Certificate instance using the specified properties. + * @param [properties] Properties to set + * @returns Certificate instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificate): google.cloud.security.privateca.v1.Certificate; + + /** + * Encodes the specified Certificate message. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.verify|verify} messages. + * @param message Certificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Certificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.verify|verify} messages. + * @param message Certificate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Certificate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.Certificate; + + /** + * Decodes a Certificate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.Certificate; + + /** + * Verifies a Certificate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Certificate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Certificate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.Certificate; + + /** + * Creates a plain object from a Certificate message. Also converts values to other types if specified. + * @param message Certificate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.Certificate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Certificate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace Certificate { + + /** Properties of a RevocationDetails. */ + interface IRevocationDetails { + + /** RevocationDetails revocationState */ + revocationState?: (google.cloud.security.privateca.v1.RevocationReason|keyof typeof google.cloud.security.privateca.v1.RevocationReason|null); + + /** RevocationDetails revocationTime */ + revocationTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RevocationDetails. */ + class RevocationDetails implements IRevocationDetails { + + /** + * Constructs a new RevocationDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.Certificate.IRevocationDetails); + + /** RevocationDetails revocationState. */ + public revocationState: (google.cloud.security.privateca.v1.RevocationReason|keyof typeof google.cloud.security.privateca.v1.RevocationReason); + + /** RevocationDetails revocationTime. */ + public revocationTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new RevocationDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns RevocationDetails instance + */ + public static create(properties?: google.cloud.security.privateca.v1.Certificate.IRevocationDetails): google.cloud.security.privateca.v1.Certificate.RevocationDetails; + + /** + * Encodes the specified RevocationDetails message. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.RevocationDetails.verify|verify} messages. + * @param message RevocationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.Certificate.IRevocationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevocationDetails message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.RevocationDetails.verify|verify} messages. + * @param message RevocationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.Certificate.IRevocationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.Certificate.RevocationDetails; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.Certificate.RevocationDetails; + + /** + * Verifies a RevocationDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevocationDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevocationDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.Certificate.RevocationDetails; + + /** + * Creates a plain object from a RevocationDetails message. Also converts values to other types if specified. + * @param message RevocationDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.Certificate.RevocationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevocationDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a CertificateTemplate. */ + interface ICertificateTemplate { + + /** CertificateTemplate name */ + name?: (string|null); + + /** CertificateTemplate predefinedValues */ + predefinedValues?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** CertificateTemplate identityConstraints */ + identityConstraints?: (google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null); + + /** CertificateTemplate passthroughExtensions */ + passthroughExtensions?: (google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null); + + /** CertificateTemplate description */ + description?: (string|null); + + /** CertificateTemplate createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateTemplate updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateTemplate labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a CertificateTemplate. */ + class CertificateTemplate implements ICertificateTemplate { + + /** + * Constructs a new CertificateTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificateTemplate); + + /** CertificateTemplate name. */ + public name: string; + + /** CertificateTemplate predefinedValues. */ + public predefinedValues?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** CertificateTemplate identityConstraints. */ + public identityConstraints?: (google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null); + + /** CertificateTemplate passthroughExtensions. */ + public passthroughExtensions?: (google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null); + + /** CertificateTemplate description. */ + public description: string; + + /** CertificateTemplate createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateTemplate updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateTemplate labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new CertificateTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateTemplate instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificateTemplate): google.cloud.security.privateca.v1.CertificateTemplate; + + /** + * Encodes the specified CertificateTemplate message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateTemplate.verify|verify} messages. + * @param message CertificateTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificateTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateTemplate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateTemplate.verify|verify} messages. + * @param message CertificateTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateTemplate; + + /** + * Decodes a CertificateTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateTemplate; + + /** + * Verifies a CertificateTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateTemplate + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateTemplate; + + /** + * Creates a plain object from a CertificateTemplate message. Also converts values to other types if specified. + * @param message CertificateTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a X509Parameters. */ + interface IX509Parameters { + + /** X509Parameters keyUsage */ + keyUsage?: (google.cloud.security.privateca.v1.IKeyUsage|null); + + /** X509Parameters caOptions */ + caOptions?: (google.cloud.security.privateca.v1.X509Parameters.ICaOptions|null); + + /** X509Parameters policyIds */ + policyIds?: (google.cloud.security.privateca.v1.IObjectId[]|null); + + /** X509Parameters aiaOcspServers */ + aiaOcspServers?: (string[]|null); + + /** X509Parameters additionalExtensions */ + additionalExtensions?: (google.cloud.security.privateca.v1.IX509Extension[]|null); + } + + /** Represents a X509Parameters. */ + class X509Parameters implements IX509Parameters { + + /** + * Constructs a new X509Parameters. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IX509Parameters); + + /** X509Parameters keyUsage. */ + public keyUsage?: (google.cloud.security.privateca.v1.IKeyUsage|null); + + /** X509Parameters caOptions. */ + public caOptions?: (google.cloud.security.privateca.v1.X509Parameters.ICaOptions|null); + + /** X509Parameters policyIds. */ + public policyIds: google.cloud.security.privateca.v1.IObjectId[]; + + /** X509Parameters aiaOcspServers. */ + public aiaOcspServers: string[]; + + /** X509Parameters additionalExtensions. */ + public additionalExtensions: google.cloud.security.privateca.v1.IX509Extension[]; + + /** + * Creates a new X509Parameters instance using the specified properties. + * @param [properties] Properties to set + * @returns X509Parameters instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IX509Parameters): google.cloud.security.privateca.v1.X509Parameters; + + /** + * Encodes the specified X509Parameters message. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.verify|verify} messages. + * @param message X509Parameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IX509Parameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified X509Parameters message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.verify|verify} messages. + * @param message X509Parameters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IX509Parameters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a X509Parameters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns X509Parameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.X509Parameters; + + /** + * Decodes a X509Parameters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns X509Parameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.X509Parameters; + + /** + * Verifies a X509Parameters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a X509Parameters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns X509Parameters + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.X509Parameters; + + /** + * Creates a plain object from a X509Parameters message. Also converts values to other types if specified. + * @param message X509Parameters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.X509Parameters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this X509Parameters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace X509Parameters { + + /** Properties of a CaOptions. */ + interface ICaOptions { + + /** CaOptions isCa */ + isCa?: (boolean|null); + + /** CaOptions maxIssuerPathLength */ + maxIssuerPathLength?: (number|null); + } + + /** Represents a CaOptions. */ + class CaOptions implements ICaOptions { + + /** + * Constructs a new CaOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.X509Parameters.ICaOptions); + + /** CaOptions isCa. */ + public isCa: boolean; + + /** CaOptions maxIssuerPathLength. */ + public maxIssuerPathLength: number; + + /** + * Creates a new CaOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CaOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1.X509Parameters.ICaOptions): google.cloud.security.privateca.v1.X509Parameters.CaOptions; + + /** + * Encodes the specified CaOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.CaOptions.verify|verify} messages. + * @param message CaOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.X509Parameters.ICaOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CaOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.CaOptions.verify|verify} messages. + * @param message CaOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.X509Parameters.ICaOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CaOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.X509Parameters.CaOptions; + + /** + * Decodes a CaOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.X509Parameters.CaOptions; + + /** + * Verifies a CaOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CaOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CaOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.X509Parameters.CaOptions; + + /** + * Creates a plain object from a CaOptions message. Also converts values to other types if specified. + * @param message CaOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.X509Parameters.CaOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CaOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SubordinateConfig. */ + interface ISubordinateConfig { + + /** SubordinateConfig certificateAuthority */ + certificateAuthority?: (string|null); + + /** SubordinateConfig pemIssuerChain */ + pemIssuerChain?: (google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain|null); + } + + /** Represents a SubordinateConfig. */ + class SubordinateConfig implements ISubordinateConfig { + + /** + * Constructs a new SubordinateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ISubordinateConfig); + + /** SubordinateConfig certificateAuthority. */ + public certificateAuthority: string; + + /** SubordinateConfig pemIssuerChain. */ + public pemIssuerChain?: (google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain|null); + + /** SubordinateConfig subordinateConfig. */ + public subordinateConfig?: ("certificateAuthority"|"pemIssuerChain"); + + /** + * Creates a new SubordinateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SubordinateConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ISubordinateConfig): google.cloud.security.privateca.v1.SubordinateConfig; + + /** + * Encodes the specified SubordinateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.verify|verify} messages. + * @param message SubordinateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ISubordinateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubordinateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.verify|verify} messages. + * @param message SubordinateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ISubordinateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.SubordinateConfig; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.SubordinateConfig; + + /** + * Verifies a SubordinateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubordinateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubordinateConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.SubordinateConfig; + + /** + * Creates a plain object from a SubordinateConfig message. Also converts values to other types if specified. + * @param message SubordinateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.SubordinateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubordinateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SubordinateConfig { + + /** Properties of a SubordinateConfigChain. */ + interface ISubordinateConfigChain { + + /** SubordinateConfigChain pemCertificates */ + pemCertificates?: (string[]|null); + } + + /** Represents a SubordinateConfigChain. */ + class SubordinateConfigChain implements ISubordinateConfigChain { + + /** + * Constructs a new SubordinateConfigChain. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain); + + /** SubordinateConfigChain pemCertificates. */ + public pemCertificates: string[]; + + /** + * Creates a new SubordinateConfigChain instance using the specified properties. + * @param [properties] Properties to set + * @returns SubordinateConfigChain instance + */ + public static create(properties?: google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain): google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain; + + /** + * Encodes the specified SubordinateConfigChain message. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @param message SubordinateConfigChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubordinateConfigChain message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @param message SubordinateConfigChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain; + + /** + * Verifies a SubordinateConfigChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubordinateConfigChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubordinateConfigChain + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain; + + /** + * Creates a plain object from a SubordinateConfigChain message. Also converts values to other types if specified. + * @param message SubordinateConfigChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubordinateConfigChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a PublicKey. */ + interface IPublicKey { + + /** PublicKey key */ + key?: (Uint8Array|string|null); + + /** PublicKey format */ + format?: (google.cloud.security.privateca.v1.PublicKey.KeyFormat|keyof typeof google.cloud.security.privateca.v1.PublicKey.KeyFormat|null); + } + + /** Represents a PublicKey. */ + class PublicKey implements IPublicKey { + + /** + * Constructs a new PublicKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IPublicKey); + + /** PublicKey key. */ + public key: (Uint8Array|string); + + /** PublicKey format. */ + public format: (google.cloud.security.privateca.v1.PublicKey.KeyFormat|keyof typeof google.cloud.security.privateca.v1.PublicKey.KeyFormat); + + /** + * Creates a new PublicKey instance using the specified properties. + * @param [properties] Properties to set + * @returns PublicKey instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IPublicKey): google.cloud.security.privateca.v1.PublicKey; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.security.privateca.v1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.PublicKey; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.PublicKey; + + /** + * Verifies a PublicKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKey + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.PublicKey; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @param message PublicKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace PublicKey { + + /** KeyFormat enum. */ + enum KeyFormat { + KEY_FORMAT_UNSPECIFIED = 0, + PEM = 1 + } + } + + /** Properties of a CertificateConfig. */ + interface ICertificateConfig { + + /** CertificateConfig subjectConfig */ + subjectConfig?: (google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig|null); + + /** CertificateConfig x509Config */ + x509Config?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** CertificateConfig publicKey */ + publicKey?: (google.cloud.security.privateca.v1.IPublicKey|null); + } + + /** Represents a CertificateConfig. */ + class CertificateConfig implements ICertificateConfig { + + /** + * Constructs a new CertificateConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificateConfig); + + /** CertificateConfig subjectConfig. */ + public subjectConfig?: (google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig|null); + + /** CertificateConfig x509Config. */ + public x509Config?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** CertificateConfig publicKey. */ + public publicKey?: (google.cloud.security.privateca.v1.IPublicKey|null); + + /** + * Creates a new CertificateConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificateConfig): google.cloud.security.privateca.v1.CertificateConfig; + + /** + * Encodes the specified CertificateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.verify|verify} messages. + * @param message CertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.verify|verify} messages. + * @param message CertificateConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateConfig; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateConfig; + + /** + * Verifies a CertificateConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateConfig; + + /** + * Creates a plain object from a CertificateConfig message. Also converts values to other types if specified. + * @param message CertificateConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateConfig { + + /** Properties of a SubjectConfig. */ + interface ISubjectConfig { + + /** SubjectConfig subject */ + subject?: (google.cloud.security.privateca.v1.ISubject|null); + + /** SubjectConfig subjectAltName */ + subjectAltName?: (google.cloud.security.privateca.v1.ISubjectAltNames|null); + } + + /** Represents a SubjectConfig. */ + class SubjectConfig implements ISubjectConfig { + + /** + * Constructs a new SubjectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig); + + /** SubjectConfig subject. */ + public subject?: (google.cloud.security.privateca.v1.ISubject|null); + + /** SubjectConfig subjectAltName. */ + public subjectAltName?: (google.cloud.security.privateca.v1.ISubjectAltNames|null); + + /** + * Creates a new SubjectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SubjectConfig instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig): google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig; + + /** + * Encodes the specified SubjectConfig message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @param message SubjectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubjectConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @param message SubjectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig; + + /** + * Verifies a SubjectConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubjectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubjectConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig; + + /** + * Creates a plain object from a SubjectConfig message. Also converts values to other types if specified. + * @param message SubjectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubjectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a CertificateDescription. */ + interface ICertificateDescription { + + /** CertificateDescription subjectDescription */ + subjectDescription?: (google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription|null); + + /** CertificateDescription x509Description */ + x509Description?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** CertificateDescription publicKey */ + publicKey?: (google.cloud.security.privateca.v1.IPublicKey|null); + + /** CertificateDescription subjectKeyId */ + subjectKeyId?: (google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null); + + /** CertificateDescription authorityKeyId */ + authorityKeyId?: (google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null); + + /** CertificateDescription crlDistributionPoints */ + crlDistributionPoints?: (string[]|null); + + /** CertificateDescription aiaIssuingCertificateUrls */ + aiaIssuingCertificateUrls?: (string[]|null); + + /** CertificateDescription certFingerprint */ + certFingerprint?: (google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint|null); + } + + /** Represents a CertificateDescription. */ + class CertificateDescription implements ICertificateDescription { + + /** + * Constructs a new CertificateDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificateDescription); + + /** CertificateDescription subjectDescription. */ + public subjectDescription?: (google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription|null); + + /** CertificateDescription x509Description. */ + public x509Description?: (google.cloud.security.privateca.v1.IX509Parameters|null); + + /** CertificateDescription publicKey. */ + public publicKey?: (google.cloud.security.privateca.v1.IPublicKey|null); + + /** CertificateDescription subjectKeyId. */ + public subjectKeyId?: (google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null); + + /** CertificateDescription authorityKeyId. */ + public authorityKeyId?: (google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null); + + /** CertificateDescription crlDistributionPoints. */ + public crlDistributionPoints: string[]; + + /** CertificateDescription aiaIssuingCertificateUrls. */ + public aiaIssuingCertificateUrls: string[]; + + /** CertificateDescription certFingerprint. */ + public certFingerprint?: (google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint|null); + + /** + * Creates a new CertificateDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateDescription instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificateDescription): google.cloud.security.privateca.v1.CertificateDescription; + + /** + * Encodes the specified CertificateDescription message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.verify|verify} messages. + * @param message CertificateDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificateDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.verify|verify} messages. + * @param message CertificateDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateDescription; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateDescription; + + /** + * Verifies a CertificateDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateDescription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateDescription; + + /** + * Creates a plain object from a CertificateDescription message. Also converts values to other types if specified. + * @param message CertificateDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateDescription { + + /** Properties of a SubjectDescription. */ + interface ISubjectDescription { + + /** SubjectDescription subject */ + subject?: (google.cloud.security.privateca.v1.ISubject|null); + + /** SubjectDescription subjectAltName */ + subjectAltName?: (google.cloud.security.privateca.v1.ISubjectAltNames|null); + + /** SubjectDescription hexSerialNumber */ + hexSerialNumber?: (string|null); + + /** SubjectDescription lifetime */ + lifetime?: (google.protobuf.IDuration|null); + + /** SubjectDescription notBeforeTime */ + notBeforeTime?: (google.protobuf.ITimestamp|null); + + /** SubjectDescription notAfterTime */ + notAfterTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a SubjectDescription. */ + class SubjectDescription implements ISubjectDescription { + + /** + * Constructs a new SubjectDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription); + + /** SubjectDescription subject. */ + public subject?: (google.cloud.security.privateca.v1.ISubject|null); + + /** SubjectDescription subjectAltName. */ + public subjectAltName?: (google.cloud.security.privateca.v1.ISubjectAltNames|null); + + /** SubjectDescription hexSerialNumber. */ + public hexSerialNumber: string; + + /** SubjectDescription lifetime. */ + public lifetime?: (google.protobuf.IDuration|null); + + /** SubjectDescription notBeforeTime. */ + public notBeforeTime?: (google.protobuf.ITimestamp|null); + + /** SubjectDescription notAfterTime. */ + public notAfterTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new SubjectDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns SubjectDescription instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription): google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription; + + /** + * Encodes the specified SubjectDescription message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @param message SubjectDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubjectDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @param message SubjectDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription; + + /** + * Verifies a SubjectDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubjectDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubjectDescription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription; + + /** + * Creates a plain object from a SubjectDescription message. Also converts values to other types if specified. + * @param message SubjectDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubjectDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyId. */ + interface IKeyId { + + /** KeyId keyId */ + keyId?: (string|null); + } + + /** Represents a KeyId. */ + class KeyId implements IKeyId { + + /** + * Constructs a new KeyId. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CertificateDescription.IKeyId); + + /** KeyId keyId. */ + public keyId: string; + + /** + * Creates a new KeyId instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyId instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CertificateDescription.IKeyId): google.cloud.security.privateca.v1.CertificateDescription.KeyId; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CertificateDescription.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.KeyId.verify|verify} messages. + * @param message KeyId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateDescription.IKeyId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateDescription.KeyId; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateDescription.KeyId; + + /** + * Verifies a KeyId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyId + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateDescription.KeyId; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @param message KeyId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateDescription.KeyId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertificateFingerprint. */ + interface ICertificateFingerprint { + + /** CertificateFingerprint sha256Hash */ + sha256Hash?: (string|null); + } + + /** Represents a CertificateFingerprint. */ + class CertificateFingerprint implements ICertificateFingerprint { + + /** + * Constructs a new CertificateFingerprint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint); + + /** CertificateFingerprint sha256Hash. */ + public sha256Hash: string; + + /** + * Creates a new CertificateFingerprint instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateFingerprint instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint): google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint; + + /** + * Encodes the specified CertificateFingerprint message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @param message CertificateFingerprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateFingerprint message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @param message CertificateFingerprint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint; + + /** + * Verifies a CertificateFingerprint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateFingerprint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateFingerprint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint; + + /** + * Creates a plain object from a CertificateFingerprint message. Also converts values to other types if specified. + * @param message CertificateFingerprint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateFingerprint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of an ObjectId. */ + interface IObjectId { + + /** ObjectId objectIdPath */ + objectIdPath?: (number[]|null); + } + + /** Represents an ObjectId. */ + class ObjectId implements IObjectId { + + /** + * Constructs a new ObjectId. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IObjectId); + + /** ObjectId objectIdPath. */ + public objectIdPath: number[]; + + /** + * Creates a new ObjectId instance using the specified properties. + * @param [properties] Properties to set + * @returns ObjectId instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IObjectId): google.cloud.security.privateca.v1.ObjectId; + + /** + * Encodes the specified ObjectId message. Does not implicitly {@link google.cloud.security.privateca.v1.ObjectId.verify|verify} messages. + * @param message ObjectId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IObjectId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ObjectId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ObjectId.verify|verify} messages. + * @param message ObjectId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IObjectId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ObjectId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ObjectId; + + /** + * Decodes an ObjectId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ObjectId; + + /** + * Verifies an ObjectId message. + * @param message Plain 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 ObjectId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ObjectId + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ObjectId; + + /** + * Creates a plain object from an ObjectId message. Also converts values to other types if specified. + * @param message ObjectId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ObjectId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ObjectId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a X509Extension. */ + interface IX509Extension { + + /** X509Extension objectId */ + objectId?: (google.cloud.security.privateca.v1.IObjectId|null); + + /** X509Extension critical */ + critical?: (boolean|null); + + /** X509Extension value */ + value?: (Uint8Array|string|null); + } + + /** Represents a X509Extension. */ + class X509Extension implements IX509Extension { + + /** + * Constructs a new X509Extension. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IX509Extension); + + /** X509Extension objectId. */ + public objectId?: (google.cloud.security.privateca.v1.IObjectId|null); + + /** X509Extension critical. */ + public critical: boolean; + + /** X509Extension value. */ + public value: (Uint8Array|string); + + /** + * Creates a new X509Extension instance using the specified properties. + * @param [properties] Properties to set + * @returns X509Extension instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IX509Extension): google.cloud.security.privateca.v1.X509Extension; + + /** + * Encodes the specified X509Extension message. Does not implicitly {@link google.cloud.security.privateca.v1.X509Extension.verify|verify} messages. + * @param message X509Extension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IX509Extension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified X509Extension message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.X509Extension.verify|verify} messages. + * @param message X509Extension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IX509Extension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a X509Extension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.X509Extension; + + /** + * Decodes a X509Extension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.X509Extension; + + /** + * Verifies a X509Extension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a X509Extension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns X509Extension + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.X509Extension; + + /** + * Creates a plain object from a X509Extension message. Also converts values to other types if specified. + * @param message X509Extension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.X509Extension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this X509Extension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyUsage. */ + interface IKeyUsage { + + /** KeyUsage baseKeyUsage */ + baseKeyUsage?: (google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions|null); + + /** KeyUsage extendedKeyUsage */ + extendedKeyUsage?: (google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions|null); + + /** KeyUsage unknownExtendedKeyUsages */ + unknownExtendedKeyUsages?: (google.cloud.security.privateca.v1.IObjectId[]|null); + } + + /** Represents a KeyUsage. */ + class KeyUsage implements IKeyUsage { + + /** + * Constructs a new KeyUsage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IKeyUsage); + + /** KeyUsage baseKeyUsage. */ + public baseKeyUsage?: (google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions|null); + + /** KeyUsage extendedKeyUsage. */ + public extendedKeyUsage?: (google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions|null); + + /** KeyUsage unknownExtendedKeyUsages. */ + public unknownExtendedKeyUsages: google.cloud.security.privateca.v1.IObjectId[]; + + /** + * Creates a new KeyUsage instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyUsage instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IKeyUsage): google.cloud.security.privateca.v1.KeyUsage; + + /** + * Encodes the specified KeyUsage message. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.verify|verify} messages. + * @param message KeyUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IKeyUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyUsage message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.verify|verify} messages. + * @param message KeyUsage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IKeyUsage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyUsage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.KeyUsage; + + /** + * Decodes a KeyUsage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.KeyUsage; + + /** + * Verifies a KeyUsage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyUsage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyUsage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.KeyUsage; + + /** + * Creates a plain object from a KeyUsage message. Also converts values to other types if specified. + * @param message KeyUsage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.KeyUsage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyUsage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace KeyUsage { + + /** Properties of a KeyUsageOptions. */ + interface IKeyUsageOptions { + + /** KeyUsageOptions digitalSignature */ + digitalSignature?: (boolean|null); + + /** KeyUsageOptions contentCommitment */ + contentCommitment?: (boolean|null); + + /** KeyUsageOptions keyEncipherment */ + keyEncipherment?: (boolean|null); + + /** KeyUsageOptions dataEncipherment */ + dataEncipherment?: (boolean|null); + + /** KeyUsageOptions keyAgreement */ + keyAgreement?: (boolean|null); + + /** KeyUsageOptions certSign */ + certSign?: (boolean|null); + + /** KeyUsageOptions crlSign */ + crlSign?: (boolean|null); + + /** KeyUsageOptions encipherOnly */ + encipherOnly?: (boolean|null); + + /** KeyUsageOptions decipherOnly */ + decipherOnly?: (boolean|null); + } + + /** Represents a KeyUsageOptions. */ + class KeyUsageOptions implements IKeyUsageOptions { + + /** + * Constructs a new KeyUsageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions); + + /** KeyUsageOptions digitalSignature. */ + public digitalSignature: boolean; + + /** KeyUsageOptions contentCommitment. */ + public contentCommitment: boolean; + + /** KeyUsageOptions keyEncipherment. */ + public keyEncipherment: boolean; + + /** KeyUsageOptions dataEncipherment. */ + public dataEncipherment: boolean; + + /** KeyUsageOptions keyAgreement. */ + public keyAgreement: boolean; + + /** KeyUsageOptions certSign. */ + public certSign: boolean; + + /** KeyUsageOptions crlSign. */ + public crlSign: boolean; + + /** KeyUsageOptions encipherOnly. */ + public encipherOnly: boolean; + + /** KeyUsageOptions decipherOnly. */ + public decipherOnly: boolean; + + /** + * Creates a new KeyUsageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyUsageOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions): google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions; + + /** + * Encodes the specified KeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @param message KeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @param message KeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions; + + /** + * Verifies a KeyUsageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyUsageOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions; + + /** + * Creates a plain object from a KeyUsageOptions message. Also converts values to other types if specified. + * @param message KeyUsageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyUsageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ExtendedKeyUsageOptions. */ + interface IExtendedKeyUsageOptions { + + /** ExtendedKeyUsageOptions serverAuth */ + serverAuth?: (boolean|null); + + /** ExtendedKeyUsageOptions clientAuth */ + clientAuth?: (boolean|null); + + /** ExtendedKeyUsageOptions codeSigning */ + codeSigning?: (boolean|null); + + /** ExtendedKeyUsageOptions emailProtection */ + emailProtection?: (boolean|null); + + /** ExtendedKeyUsageOptions timeStamping */ + timeStamping?: (boolean|null); + + /** ExtendedKeyUsageOptions ocspSigning */ + ocspSigning?: (boolean|null); + } + + /** Represents an ExtendedKeyUsageOptions. */ + class ExtendedKeyUsageOptions implements IExtendedKeyUsageOptions { + + /** + * Constructs a new ExtendedKeyUsageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions); + + /** ExtendedKeyUsageOptions serverAuth. */ + public serverAuth: boolean; + + /** ExtendedKeyUsageOptions clientAuth. */ + public clientAuth: boolean; + + /** ExtendedKeyUsageOptions codeSigning. */ + public codeSigning: boolean; + + /** ExtendedKeyUsageOptions emailProtection. */ + public emailProtection: boolean; + + /** ExtendedKeyUsageOptions timeStamping. */ + public timeStamping: boolean; + + /** ExtendedKeyUsageOptions ocspSigning. */ + public ocspSigning: boolean; + + /** + * Creates a new ExtendedKeyUsageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtendedKeyUsageOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions): google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Encodes the specified ExtendedKeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @param message ExtendedKeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtendedKeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @param message ExtendedKeyUsageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Verifies an ExtendedKeyUsageOptions message. + * @param message Plain 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 ExtendedKeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtendedKeyUsageOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions; + + /** + * Creates a plain object from an ExtendedKeyUsageOptions message. Also converts values to other types if specified. + * @param message ExtendedKeyUsageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtendedKeyUsageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a Subject. */ + interface ISubject { + + /** Subject commonName */ + commonName?: (string|null); + + /** Subject countryCode */ + countryCode?: (string|null); + + /** Subject organization */ + organization?: (string|null); + + /** Subject organizationalUnit */ + organizationalUnit?: (string|null); + + /** Subject locality */ + locality?: (string|null); + + /** Subject province */ + province?: (string|null); + + /** Subject streetAddress */ + streetAddress?: (string|null); + + /** Subject postalCode */ + postalCode?: (string|null); + } + + /** Represents a Subject. */ + class Subject implements ISubject { + + /** + * Constructs a new Subject. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ISubject); + + /** Subject commonName. */ + public commonName: string; + + /** Subject countryCode. */ + public countryCode: string; + + /** Subject organization. */ + public organization: string; + + /** Subject organizationalUnit. */ + public organizationalUnit: string; + + /** Subject locality. */ + public locality: string; + + /** Subject province. */ + public province: string; + + /** Subject streetAddress. */ + public streetAddress: string; + + /** Subject postalCode. */ + public postalCode: string; + + /** + * Creates a new Subject instance using the specified properties. + * @param [properties] Properties to set + * @returns Subject instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ISubject): google.cloud.security.privateca.v1.Subject; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.security.privateca.v1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.Subject.verify|verify} messages. + * @param message Subject message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ISubject, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.Subject; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.Subject; + + /** + * Verifies a Subject message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Subject + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.Subject; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @param message Subject + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.Subject, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Subject to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SubjectAltNames. */ + interface ISubjectAltNames { + + /** SubjectAltNames dnsNames */ + dnsNames?: (string[]|null); + + /** SubjectAltNames uris */ + uris?: (string[]|null); + + /** SubjectAltNames emailAddresses */ + emailAddresses?: (string[]|null); + + /** SubjectAltNames ipAddresses */ + ipAddresses?: (string[]|null); + + /** SubjectAltNames customSans */ + customSans?: (google.cloud.security.privateca.v1.IX509Extension[]|null); + } + + /** Represents a SubjectAltNames. */ + class SubjectAltNames implements ISubjectAltNames { + + /** + * Constructs a new SubjectAltNames. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ISubjectAltNames); + + /** SubjectAltNames dnsNames. */ + public dnsNames: string[]; + + /** SubjectAltNames uris. */ + public uris: string[]; + + /** SubjectAltNames emailAddresses. */ + public emailAddresses: string[]; + + /** SubjectAltNames ipAddresses. */ + public ipAddresses: string[]; + + /** SubjectAltNames customSans. */ + public customSans: google.cloud.security.privateca.v1.IX509Extension[]; + + /** + * Creates a new SubjectAltNames instance using the specified properties. + * @param [properties] Properties to set + * @returns SubjectAltNames instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ISubjectAltNames): google.cloud.security.privateca.v1.SubjectAltNames; + + /** + * Encodes the specified SubjectAltNames message. Does not implicitly {@link google.cloud.security.privateca.v1.SubjectAltNames.verify|verify} messages. + * @param message SubjectAltNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ISubjectAltNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SubjectAltNames message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.SubjectAltNames.verify|verify} messages. + * @param message SubjectAltNames message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ISubjectAltNames, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.SubjectAltNames; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.SubjectAltNames; + + /** + * Verifies a SubjectAltNames message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SubjectAltNames message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SubjectAltNames + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.SubjectAltNames; + + /** + * Creates a plain object from a SubjectAltNames message. Also converts values to other types if specified. + * @param message SubjectAltNames + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.SubjectAltNames, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SubjectAltNames to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertificateIdentityConstraints. */ + interface ICertificateIdentityConstraints { + + /** CertificateIdentityConstraints celExpression */ + celExpression?: (google.type.IExpr|null); + + /** CertificateIdentityConstraints allowSubjectPassthrough */ + allowSubjectPassthrough?: (boolean|null); + + /** CertificateIdentityConstraints allowSubjectAltNamesPassthrough */ + allowSubjectAltNamesPassthrough?: (boolean|null); + } + + /** Represents a CertificateIdentityConstraints. */ + class CertificateIdentityConstraints implements ICertificateIdentityConstraints { + + /** + * Constructs a new CertificateIdentityConstraints. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificateIdentityConstraints); + + /** CertificateIdentityConstraints celExpression. */ + public celExpression?: (google.type.IExpr|null); + + /** CertificateIdentityConstraints allowSubjectPassthrough. */ + public allowSubjectPassthrough: boolean; + + /** CertificateIdentityConstraints allowSubjectAltNamesPassthrough. */ + public allowSubjectAltNamesPassthrough: boolean; + + /** + * Creates a new CertificateIdentityConstraints instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateIdentityConstraints instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificateIdentityConstraints): google.cloud.security.privateca.v1.CertificateIdentityConstraints; + + /** + * Encodes the specified CertificateIdentityConstraints message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateIdentityConstraints.verify|verify} messages. + * @param message CertificateIdentityConstraints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificateIdentityConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateIdentityConstraints message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateIdentityConstraints.verify|verify} messages. + * @param message CertificateIdentityConstraints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateIdentityConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateIdentityConstraints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateIdentityConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateIdentityConstraints; + + /** + * Decodes a CertificateIdentityConstraints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateIdentityConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateIdentityConstraints; + + /** + * Verifies a CertificateIdentityConstraints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateIdentityConstraints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateIdentityConstraints + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateIdentityConstraints; + + /** + * Creates a plain object from a CertificateIdentityConstraints message. Also converts values to other types if specified. + * @param message CertificateIdentityConstraints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateIdentityConstraints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateIdentityConstraints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertificateExtensionConstraints. */ + interface ICertificateExtensionConstraints { + + /** CertificateExtensionConstraints knownExtensions */ + knownExtensions?: (google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension[]|null); + + /** CertificateExtensionConstraints additionalExtensions */ + additionalExtensions?: (google.cloud.security.privateca.v1.IObjectId[]|null); + } + + /** Represents a CertificateExtensionConstraints. */ + class CertificateExtensionConstraints implements ICertificateExtensionConstraints { + + /** + * Constructs a new CertificateExtensionConstraints. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICertificateExtensionConstraints); + + /** CertificateExtensionConstraints knownExtensions. */ + public knownExtensions: google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension[]; + + /** CertificateExtensionConstraints additionalExtensions. */ + public additionalExtensions: google.cloud.security.privateca.v1.IObjectId[]; + + /** + * Creates a new CertificateExtensionConstraints instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateExtensionConstraints instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICertificateExtensionConstraints): google.cloud.security.privateca.v1.CertificateExtensionConstraints; + + /** + * Encodes the specified CertificateExtensionConstraints message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateExtensionConstraints.verify|verify} messages. + * @param message CertificateExtensionConstraints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICertificateExtensionConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateExtensionConstraints message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateExtensionConstraints.verify|verify} messages. + * @param message CertificateExtensionConstraints message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICertificateExtensionConstraints, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateExtensionConstraints message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateExtensionConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CertificateExtensionConstraints; + + /** + * Decodes a CertificateExtensionConstraints message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateExtensionConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CertificateExtensionConstraints; + + /** + * Verifies a CertificateExtensionConstraints message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateExtensionConstraints message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateExtensionConstraints + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CertificateExtensionConstraints; + + /** + * Creates a plain object from a CertificateExtensionConstraints message. Also converts values to other types if specified. + * @param message CertificateExtensionConstraints + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CertificateExtensionConstraints, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateExtensionConstraints to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateExtensionConstraints { + + /** KnownCertificateExtension enum. */ + enum KnownCertificateExtension { + KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED = 0, + BASE_KEY_USAGE = 1, + EXTENDED_KEY_USAGE = 2, + CA_OPTIONS = 3, + POLICY_IDS = 4, + AIA_OCSP_SERVERS = 5 + } + } + + /** RevocationReason enum. */ + enum RevocationReason { + REVOCATION_REASON_UNSPECIFIED = 0, + KEY_COMPROMISE = 1, + CERTIFICATE_AUTHORITY_COMPROMISE = 2, + AFFILIATION_CHANGED = 3, + SUPERSEDED = 4, + CESSATION_OF_OPERATION = 5, + CERTIFICATE_HOLD = 6, + PRIVILEGE_WITHDRAWN = 7, + ATTRIBUTE_AUTHORITY_COMPROMISE = 8 + } + + /** SubjectRequestMode enum. */ + enum SubjectRequestMode { + SUBJECT_REQUEST_MODE_UNSPECIFIED = 0, + DEFAULT = 1, + REFLECTED_SPIFFE = 2 + } + + /** Represents a CertificateAuthorityService */ + class CertificateAuthorityService extends $protobuf.rpc.Service { + + /** + * Constructs a new CertificateAuthorityService 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 CertificateAuthorityService 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): CertificateAuthorityService; + + /** + * Calls CreateCertificate. + * @param request CreateCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public createCertificate(request: google.cloud.security.privateca.v1.ICreateCertificateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateCallback): void; + + /** + * Calls CreateCertificate. + * @param request CreateCertificateRequest message or plain object + * @returns Promise + */ + public createCertificate(request: google.cloud.security.privateca.v1.ICreateCertificateRequest): Promise; + + /** + * Calls GetCertificate. + * @param request GetCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public getCertificate(request: google.cloud.security.privateca.v1.IGetCertificateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateCallback): void; + + /** + * Calls GetCertificate. + * @param request GetCertificateRequest message or plain object + * @returns Promise + */ + public getCertificate(request: google.cloud.security.privateca.v1.IGetCertificateRequest): Promise; + + /** + * Calls ListCertificates. + * @param request ListCertificatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificatesResponse + */ + public listCertificates(request: google.cloud.security.privateca.v1.IListCertificatesRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificatesCallback): void; + + /** + * Calls ListCertificates. + * @param request ListCertificatesRequest message or plain object + * @returns Promise + */ + public listCertificates(request: google.cloud.security.privateca.v1.IListCertificatesRequest): Promise; + + /** + * Calls RevokeCertificate. + * @param request RevokeCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public revokeCertificate(request: google.cloud.security.privateca.v1.IRevokeCertificateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificateCallback): void; + + /** + * Calls RevokeCertificate. + * @param request RevokeCertificateRequest message or plain object + * @returns Promise + */ + public revokeCertificate(request: google.cloud.security.privateca.v1.IRevokeCertificateRequest): Promise; + + /** + * Calls UpdateCertificate. + * @param request UpdateCertificateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Certificate + */ + public updateCertificate(request: google.cloud.security.privateca.v1.IUpdateCertificateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateCallback): void; + + /** + * Calls UpdateCertificate. + * @param request UpdateCertificateRequest message or plain object + * @returns Promise + */ + public updateCertificate(request: google.cloud.security.privateca.v1.IUpdateCertificateRequest): Promise; + + /** + * Calls ActivateCertificateAuthority. + * @param request ActivateCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public activateCertificateAuthority(request: google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthorityCallback): void; + + /** + * Calls ActivateCertificateAuthority. + * @param request ActivateCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public activateCertificateAuthority(request: google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest): Promise; + + /** + * Calls CreateCertificateAuthority. + * @param request CreateCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCertificateAuthority(request: google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthorityCallback): void; + + /** + * Calls CreateCertificateAuthority. + * @param request CreateCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public createCertificateAuthority(request: google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest): Promise; + + /** + * Calls DisableCertificateAuthority. + * @param request DisableCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public disableCertificateAuthority(request: google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthorityCallback): void; + + /** + * Calls DisableCertificateAuthority. + * @param request DisableCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public disableCertificateAuthority(request: google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest): Promise; + + /** + * Calls EnableCertificateAuthority. + * @param request EnableCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public enableCertificateAuthority(request: google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthorityCallback): void; + + /** + * Calls EnableCertificateAuthority. + * @param request EnableCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public enableCertificateAuthority(request: google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest): Promise; + + /** + * Calls FetchCertificateAuthorityCsr. + * @param request FetchCertificateAuthorityCsrRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchCertificateAuthorityCsrResponse + */ + public fetchCertificateAuthorityCsr(request: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsrCallback): void; + + /** + * Calls FetchCertificateAuthorityCsr. + * @param request FetchCertificateAuthorityCsrRequest message or plain object + * @returns Promise + */ + public fetchCertificateAuthorityCsr(request: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest): Promise; + + /** + * Calls GetCertificateAuthority. + * @param request GetCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CertificateAuthority + */ + public getCertificateAuthority(request: google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthorityCallback): void; + + /** + * Calls GetCertificateAuthority. + * @param request GetCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public getCertificateAuthority(request: google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest): Promise; + + /** + * Calls ListCertificateAuthorities. + * @param request ListCertificateAuthoritiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificateAuthoritiesResponse + */ + public listCertificateAuthorities(request: google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthoritiesCallback): void; + + /** + * Calls ListCertificateAuthorities. + * @param request ListCertificateAuthoritiesRequest message or plain object + * @returns Promise + */ + public listCertificateAuthorities(request: google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest): Promise; + + /** + * Calls UndeleteCertificateAuthority. + * @param request UndeleteCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public undeleteCertificateAuthority(request: google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthorityCallback): void; + + /** + * Calls UndeleteCertificateAuthority. + * @param request UndeleteCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public undeleteCertificateAuthority(request: google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest): Promise; + + /** + * Calls DeleteCertificateAuthority. + * @param request DeleteCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteCertificateAuthority(request: google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthorityCallback): void; + + /** + * Calls DeleteCertificateAuthority. + * @param request DeleteCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public deleteCertificateAuthority(request: google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest): Promise; + + /** + * Calls UpdateCertificateAuthority. + * @param request UpdateCertificateAuthorityRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCertificateAuthority(request: google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthorityCallback): void; + + /** + * Calls UpdateCertificateAuthority. + * @param request UpdateCertificateAuthorityRequest message or plain object + * @returns Promise + */ + public updateCertificateAuthority(request: google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest): Promise; + + /** + * Calls CreateCaPool. + * @param request CreateCaPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCaPool(request: google.cloud.security.privateca.v1.ICreateCaPoolRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPoolCallback): void; + + /** + * Calls CreateCaPool. + * @param request CreateCaPoolRequest message or plain object + * @returns Promise + */ + public createCaPool(request: google.cloud.security.privateca.v1.ICreateCaPoolRequest): Promise; + + /** + * Calls UpdateCaPool. + * @param request UpdateCaPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCaPool(request: google.cloud.security.privateca.v1.IUpdateCaPoolRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPoolCallback): void; + + /** + * Calls UpdateCaPool. + * @param request UpdateCaPoolRequest message or plain object + * @returns Promise + */ + public updateCaPool(request: google.cloud.security.privateca.v1.IUpdateCaPoolRequest): Promise; + + /** + * Calls GetCaPool. + * @param request GetCaPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CaPool + */ + public getCaPool(request: google.cloud.security.privateca.v1.IGetCaPoolRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPoolCallback): void; + + /** + * Calls GetCaPool. + * @param request GetCaPoolRequest message or plain object + * @returns Promise + */ + public getCaPool(request: google.cloud.security.privateca.v1.IGetCaPoolRequest): Promise; + + /** + * Calls ListCaPools. + * @param request ListCaPoolsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCaPoolsResponse + */ + public listCaPools(request: google.cloud.security.privateca.v1.IListCaPoolsRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPoolsCallback): void; + + /** + * Calls ListCaPools. + * @param request ListCaPoolsRequest message or plain object + * @returns Promise + */ + public listCaPools(request: google.cloud.security.privateca.v1.IListCaPoolsRequest): Promise; + + /** + * Calls DeleteCaPool. + * @param request DeleteCaPoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteCaPool(request: google.cloud.security.privateca.v1.IDeleteCaPoolRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPoolCallback): void; + + /** + * Calls DeleteCaPool. + * @param request DeleteCaPoolRequest message or plain object + * @returns Promise + */ + public deleteCaPool(request: google.cloud.security.privateca.v1.IDeleteCaPoolRequest): Promise; + + /** + * Calls FetchCaCerts. + * @param request FetchCaCertsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchCaCertsResponse + */ + public fetchCaCerts(request: google.cloud.security.privateca.v1.IFetchCaCertsRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCertsCallback): void; + + /** + * Calls FetchCaCerts. + * @param request FetchCaCertsRequest message or plain object + * @returns Promise + */ + public fetchCaCerts(request: google.cloud.security.privateca.v1.IFetchCaCertsRequest): Promise; + + /** + * Calls GetCertificateRevocationList. + * @param request GetCertificateRevocationListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CertificateRevocationList + */ + public getCertificateRevocationList(request: google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationListCallback): void; + + /** + * Calls GetCertificateRevocationList. + * @param request GetCertificateRevocationListRequest message or plain object + * @returns Promise + */ + public getCertificateRevocationList(request: google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest): Promise; + + /** + * Calls ListCertificateRevocationLists. + * @param request ListCertificateRevocationListsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificateRevocationListsResponse + */ + public listCertificateRevocationLists(request: google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationListsCallback): void; + + /** + * Calls ListCertificateRevocationLists. + * @param request ListCertificateRevocationListsRequest message or plain object + * @returns Promise + */ + public listCertificateRevocationLists(request: google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest): Promise; + + /** + * Calls UpdateCertificateRevocationList. + * @param request UpdateCertificateRevocationListRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCertificateRevocationList(request: google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationListCallback): void; + + /** + * Calls UpdateCertificateRevocationList. + * @param request UpdateCertificateRevocationListRequest message or plain object + * @returns Promise + */ + public updateCertificateRevocationList(request: google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest): Promise; + + /** + * Calls CreateCertificateTemplate. + * @param request CreateCertificateTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createCertificateTemplate(request: google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplateCallback): void; + + /** + * Calls CreateCertificateTemplate. + * @param request CreateCertificateTemplateRequest message or plain object + * @returns Promise + */ + public createCertificateTemplate(request: google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest): Promise; + + /** + * Calls DeleteCertificateTemplate. + * @param request DeleteCertificateTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteCertificateTemplate(request: google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplateCallback): void; + + /** + * Calls DeleteCertificateTemplate. + * @param request DeleteCertificateTemplateRequest message or plain object + * @returns Promise + */ + public deleteCertificateTemplate(request: google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest): Promise; + + /** + * Calls GetCertificateTemplate. + * @param request GetCertificateTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CertificateTemplate + */ + public getCertificateTemplate(request: google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplateCallback): void; + + /** + * Calls GetCertificateTemplate. + * @param request GetCertificateTemplateRequest message or plain object + * @returns Promise + */ + public getCertificateTemplate(request: google.cloud.security.privateca.v1.IGetCertificateTemplateRequest): Promise; + + /** + * Calls ListCertificateTemplates. + * @param request ListCertificateTemplatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCertificateTemplatesResponse + */ + public listCertificateTemplates(request: google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplatesCallback): void; + + /** + * Calls ListCertificateTemplates. + * @param request ListCertificateTemplatesRequest message or plain object + * @returns Promise + */ + public listCertificateTemplates(request: google.cloud.security.privateca.v1.IListCertificateTemplatesRequest): Promise; + + /** + * Calls UpdateCertificateTemplate. + * @param request UpdateCertificateTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateCertificateTemplate(request: google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, callback: google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplateCallback): void; + + /** + * Calls UpdateCertificateTemplate. + * @param request UpdateCertificateTemplateRequest message or plain object + * @returns Promise + */ + public updateCertificateTemplate(request: google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest): Promise; + } + + namespace CertificateAuthorityService { + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type CreateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type GetCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificates}. + * @param error Error, if any + * @param [response] ListCertificatesResponse + */ + type ListCertificatesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#revokeCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type RevokeCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificate}. + * @param error Error, if any + * @param [response] Certificate + */ + type UpdateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#activateCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type ActivateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#disableCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type DisableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#enableCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type EnableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * @param error Error, if any + * @param [response] FetchCertificateAuthorityCsrResponse + */ + type FetchCertificateAuthorityCsrCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateAuthority}. + * @param error Error, if any + * @param [response] CertificateAuthority + */ + type GetCertificateAuthorityCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CertificateAuthority) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateAuthorities}. + * @param error Error, if any + * @param [response] ListCertificateAuthoritiesResponse + */ + type ListCertificateAuthoritiesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#undeleteCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type UndeleteCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateAuthority}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCaPool}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateCaPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCaPool}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateCaPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCaPool}. + * @param error Error, if any + * @param [response] CaPool + */ + type GetCaPoolCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CaPool) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCaPools}. + * @param error Error, if any + * @param [response] ListCaPoolsResponse + */ + type ListCaPoolsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCaPoolsResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCaPool}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteCaPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCaCerts}. + * @param error Error, if any + * @param [response] FetchCaCertsResponse + */ + type FetchCaCertsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.FetchCaCertsResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateRevocationList}. + * @param error Error, if any + * @param [response] CertificateRevocationList + */ + type GetCertificateRevocationListCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CertificateRevocationList) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateRevocationLists}. + * @param error Error, if any + * @param [response] ListCertificateRevocationListsResponse + */ + type ListCertificateRevocationListsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateRevocationList}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateTemplate}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateCertificateTemplateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateTemplate}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteCertificateTemplateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateTemplate}. + * @param error Error, if any + * @param [response] CertificateTemplate + */ + type GetCertificateTemplateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CertificateTemplate) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateTemplates}. + * @param error Error, if any + * @param [response] ListCertificateTemplatesResponse + */ + type ListCertificateTemplatesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificateTemplatesResponse) => void; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateTemplate}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateCertificateTemplateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a CreateCertificateRequest. */ + interface ICreateCertificateRequest { + + /** CreateCertificateRequest parent */ + parent?: (string|null); + + /** CreateCertificateRequest certificateId */ + certificateId?: (string|null); + + /** CreateCertificateRequest certificate */ + certificate?: (google.cloud.security.privateca.v1.ICertificate|null); + + /** CreateCertificateRequest requestId */ + requestId?: (string|null); + + /** CreateCertificateRequest validateOnly */ + validateOnly?: (boolean|null); + + /** CreateCertificateRequest issuingCertificateAuthorityId */ + issuingCertificateAuthorityId?: (string|null); + } + + /** Represents a CreateCertificateRequest. */ + class CreateCertificateRequest implements ICreateCertificateRequest { + + /** + * Constructs a new CreateCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICreateCertificateRequest); + + /** CreateCertificateRequest parent. */ + public parent: string; + + /** CreateCertificateRequest certificateId. */ + public certificateId: string; + + /** CreateCertificateRequest certificate. */ + public certificate?: (google.cloud.security.privateca.v1.ICertificate|null); + + /** CreateCertificateRequest requestId. */ + public requestId: string; + + /** CreateCertificateRequest validateOnly. */ + public validateOnly: boolean; + + /** CreateCertificateRequest issuingCertificateAuthorityId. */ + public issuingCertificateAuthorityId: string; + + /** + * Creates a new CreateCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICreateCertificateRequest): google.cloud.security.privateca.v1.CreateCertificateRequest; + + /** + * Encodes the specified CreateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateRequest.verify|verify} messages. + * @param message CreateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICreateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateRequest.verify|verify} messages. + * @param message CreateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICreateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CreateCertificateRequest; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CreateCertificateRequest; + + /** + * Verifies a CreateCertificateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CreateCertificateRequest; + + /** + * Creates a plain object from a CreateCertificateRequest message. Also converts values to other types if specified. + * @param message CreateCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CreateCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateRequest. */ + interface IGetCertificateRequest { + + /** GetCertificateRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateRequest. */ + class GetCertificateRequest implements IGetCertificateRequest { + + /** + * Constructs a new GetCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IGetCertificateRequest); + + /** GetCertificateRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IGetCertificateRequest): google.cloud.security.privateca.v1.GetCertificateRequest; + + /** + * Encodes the specified GetCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRequest.verify|verify} messages. + * @param message GetCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IGetCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRequest.verify|verify} messages. + * @param message GetCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IGetCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.GetCertificateRequest; + + /** + * Decodes a GetCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.GetCertificateRequest; + + /** + * Verifies a GetCertificateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.GetCertificateRequest; + + /** + * Creates a plain object from a GetCertificateRequest message. Also converts values to other types if specified. + * @param message GetCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.GetCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificatesRequest. */ + interface IListCertificatesRequest { + + /** ListCertificatesRequest parent */ + parent?: (string|null); + + /** ListCertificatesRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificatesRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificatesRequest filter */ + filter?: (string|null); + + /** ListCertificatesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificatesRequest. */ + class ListCertificatesRequest implements IListCertificatesRequest { + + /** + * Constructs a new ListCertificatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificatesRequest); + + /** ListCertificatesRequest parent. */ + public parent: string; + + /** ListCertificatesRequest pageSize. */ + public pageSize: number; + + /** ListCertificatesRequest pageToken. */ + public pageToken: string; + + /** ListCertificatesRequest filter. */ + public filter: string; + + /** ListCertificatesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificatesRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificatesRequest): google.cloud.security.privateca.v1.ListCertificatesRequest; + + /** + * Encodes the specified ListCertificatesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesRequest.verify|verify} messages. + * @param message ListCertificatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificatesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesRequest.verify|verify} messages. + * @param message ListCertificatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificatesRequest; + + /** + * Decodes a ListCertificatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificatesRequest; + + /** + * Verifies a ListCertificatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificatesRequest; + + /** + * Creates a plain object from a ListCertificatesRequest message. Also converts values to other types if specified. + * @param message ListCertificatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificatesResponse. */ + interface IListCertificatesResponse { + + /** ListCertificatesResponse certificates */ + certificates?: (google.cloud.security.privateca.v1.ICertificate[]|null); + + /** ListCertificatesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificatesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificatesResponse. */ + class ListCertificatesResponse implements IListCertificatesResponse { + + /** + * Constructs a new ListCertificatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificatesResponse); + + /** ListCertificatesResponse certificates. */ + public certificates: google.cloud.security.privateca.v1.ICertificate[]; + + /** ListCertificatesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificatesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificatesResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificatesResponse): google.cloud.security.privateca.v1.ListCertificatesResponse; + + /** + * Encodes the specified ListCertificatesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesResponse.verify|verify} messages. + * @param message ListCertificatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificatesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesResponse.verify|verify} messages. + * @param message ListCertificatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificatesResponse; + + /** + * Decodes a ListCertificatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificatesResponse; + + /** + * Verifies a ListCertificatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificatesResponse; + + /** + * Creates a plain object from a ListCertificatesResponse message. Also converts values to other types if specified. + * @param message ListCertificatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RevokeCertificateRequest. */ + interface IRevokeCertificateRequest { + + /** RevokeCertificateRequest name */ + name?: (string|null); + + /** RevokeCertificateRequest reason */ + reason?: (google.cloud.security.privateca.v1.RevocationReason|keyof typeof google.cloud.security.privateca.v1.RevocationReason|null); + + /** RevokeCertificateRequest requestId */ + requestId?: (string|null); + } + + /** Represents a RevokeCertificateRequest. */ + class RevokeCertificateRequest implements IRevokeCertificateRequest { + + /** + * Constructs a new RevokeCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IRevokeCertificateRequest); + + /** RevokeCertificateRequest name. */ + public name: string; + + /** RevokeCertificateRequest reason. */ + public reason: (google.cloud.security.privateca.v1.RevocationReason|keyof typeof google.cloud.security.privateca.v1.RevocationReason); + + /** RevokeCertificateRequest requestId. */ + public requestId: string; + + /** + * Creates a new RevokeCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RevokeCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IRevokeCertificateRequest): google.cloud.security.privateca.v1.RevokeCertificateRequest; + + /** + * Encodes the specified RevokeCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.RevokeCertificateRequest.verify|verify} messages. + * @param message RevokeCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IRevokeCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RevokeCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.RevokeCertificateRequest.verify|verify} messages. + * @param message RevokeCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IRevokeCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.RevokeCertificateRequest; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.RevokeCertificateRequest; + + /** + * Verifies a RevokeCertificateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RevokeCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RevokeCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.RevokeCertificateRequest; + + /** + * Creates a plain object from a RevokeCertificateRequest message. Also converts values to other types if specified. + * @param message RevokeCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.RevokeCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RevokeCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateRequest. */ + interface IUpdateCertificateRequest { + + /** UpdateCertificateRequest certificate */ + certificate?: (google.cloud.security.privateca.v1.ICertificate|null); + + /** UpdateCertificateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateRequest. */ + class UpdateCertificateRequest implements IUpdateCertificateRequest { + + /** + * Constructs a new UpdateCertificateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IUpdateCertificateRequest); + + /** UpdateCertificateRequest certificate. */ + public certificate?: (google.cloud.security.privateca.v1.ICertificate|null); + + /** UpdateCertificateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IUpdateCertificateRequest): google.cloud.security.privateca.v1.UpdateCertificateRequest; + + /** + * Encodes the specified UpdateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRequest.verify|verify} messages. + * @param message UpdateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IUpdateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRequest.verify|verify} messages. + * @param message UpdateCertificateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IUpdateCertificateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.UpdateCertificateRequest; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.UpdateCertificateRequest; + + /** + * Verifies an UpdateCertificateRequest message. + * @param message Plain 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 UpdateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.UpdateCertificateRequest; + + /** + * Creates a plain object from an UpdateCertificateRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.UpdateCertificateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an ActivateCertificateAuthorityRequest. */ + interface IActivateCertificateAuthorityRequest { + + /** ActivateCertificateAuthorityRequest name */ + name?: (string|null); + + /** ActivateCertificateAuthorityRequest pemCaCertificate */ + pemCaCertificate?: (string|null); + + /** ActivateCertificateAuthorityRequest subordinateConfig */ + subordinateConfig?: (google.cloud.security.privateca.v1.ISubordinateConfig|null); + + /** ActivateCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an ActivateCertificateAuthorityRequest. */ + class ActivateCertificateAuthorityRequest implements IActivateCertificateAuthorityRequest { + + /** + * Constructs a new ActivateCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest); + + /** ActivateCertificateAuthorityRequest name. */ + public name: string; + + /** ActivateCertificateAuthorityRequest pemCaCertificate. */ + public pemCaCertificate: string; + + /** ActivateCertificateAuthorityRequest subordinateConfig. */ + public subordinateConfig?: (google.cloud.security.privateca.v1.ISubordinateConfig|null); + + /** ActivateCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new ActivateCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest): google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @param message ActivateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @param message ActivateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest; + + /** + * Verifies an ActivateCertificateAuthorityRequest message. + * @param message Plain 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 ActivateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest; + + /** + * Creates a plain object from an ActivateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message ActivateCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCertificateAuthorityRequest. */ + interface ICreateCertificateAuthorityRequest { + + /** CreateCertificateAuthorityRequest parent */ + parent?: (string|null); + + /** CreateCertificateAuthorityRequest certificateAuthorityId */ + certificateAuthorityId?: (string|null); + + /** CreateCertificateAuthorityRequest certificateAuthority */ + certificateAuthority?: (google.cloud.security.privateca.v1.ICertificateAuthority|null); + + /** CreateCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateCertificateAuthorityRequest. */ + class CreateCertificateAuthorityRequest implements ICreateCertificateAuthorityRequest { + + /** + * Constructs a new CreateCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest); + + /** CreateCertificateAuthorityRequest parent. */ + public parent: string; + + /** CreateCertificateAuthorityRequest certificateAuthorityId. */ + public certificateAuthorityId: string; + + /** CreateCertificateAuthorityRequest certificateAuthority. */ + public certificateAuthority?: (google.cloud.security.privateca.v1.ICertificateAuthority|null); + + /** CreateCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest): google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @param message CreateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @param message CreateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest; + + /** + * Verifies a CreateCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest; + + /** + * Creates a plain object from a CreateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message CreateCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DisableCertificateAuthorityRequest. */ + interface IDisableCertificateAuthorityRequest { + + /** DisableCertificateAuthorityRequest name */ + name?: (string|null); + + /** DisableCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DisableCertificateAuthorityRequest. */ + class DisableCertificateAuthorityRequest implements IDisableCertificateAuthorityRequest { + + /** + * Constructs a new DisableCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest); + + /** DisableCertificateAuthorityRequest name. */ + public name: string; + + /** DisableCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new DisableCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DisableCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest): google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @param message DisableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @param message DisableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest; + + /** + * Verifies a DisableCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisableCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest; + + /** + * Creates a plain object from a DisableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message DisableCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisableCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnableCertificateAuthorityRequest. */ + interface IEnableCertificateAuthorityRequest { + + /** EnableCertificateAuthorityRequest name */ + name?: (string|null); + + /** EnableCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an EnableCertificateAuthorityRequest. */ + class EnableCertificateAuthorityRequest implements IEnableCertificateAuthorityRequest { + + /** + * Constructs a new EnableCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest); + + /** EnableCertificateAuthorityRequest name. */ + public name: string; + + /** EnableCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new EnableCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EnableCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest): google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @param message EnableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @param message EnableCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest; + + /** + * Verifies an EnableCertificateAuthorityRequest message. + * @param message Plain 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 EnableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnableCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest; + + /** + * Creates a plain object from an EnableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message EnableCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnableCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchCertificateAuthorityCsrRequest. */ + interface IFetchCertificateAuthorityCsrRequest { + + /** FetchCertificateAuthorityCsrRequest name */ + name?: (string|null); + } + + /** Represents a FetchCertificateAuthorityCsrRequest. */ + class FetchCertificateAuthorityCsrRequest implements IFetchCertificateAuthorityCsrRequest { + + /** + * Constructs a new FetchCertificateAuthorityCsrRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest); + + /** FetchCertificateAuthorityCsrRequest name. */ + public name: string; + + /** + * Creates a new FetchCertificateAuthorityCsrRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchCertificateAuthorityCsrRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest; + + /** + * Encodes the specified FetchCertificateAuthorityCsrRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchCertificateAuthorityCsrRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchCertificateAuthorityCsrRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest; + + /** + * Decodes a FetchCertificateAuthorityCsrRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest; + + /** + * Verifies a FetchCertificateAuthorityCsrRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchCertificateAuthorityCsrRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchCertificateAuthorityCsrRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrRequest message. Also converts values to other types if specified. + * @param message FetchCertificateAuthorityCsrRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchCertificateAuthorityCsrRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchCertificateAuthorityCsrResponse. */ + interface IFetchCertificateAuthorityCsrResponse { + + /** FetchCertificateAuthorityCsrResponse pemCsr */ + pemCsr?: (string|null); + } + + /** Represents a FetchCertificateAuthorityCsrResponse. */ + class FetchCertificateAuthorityCsrResponse implements IFetchCertificateAuthorityCsrResponse { + + /** + * Constructs a new FetchCertificateAuthorityCsrResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse); + + /** FetchCertificateAuthorityCsrResponse pemCsr. */ + public pemCsr: string; + + /** + * Creates a new FetchCertificateAuthorityCsrResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchCertificateAuthorityCsrResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @param message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse; + + /** + * Verifies a FetchCertificateAuthorityCsrResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchCertificateAuthorityCsrResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchCertificateAuthorityCsrResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrResponse message. Also converts values to other types if specified. + * @param message FetchCertificateAuthorityCsrResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchCertificateAuthorityCsrResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateAuthorityRequest. */ + interface IGetCertificateAuthorityRequest { + + /** GetCertificateAuthorityRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateAuthorityRequest. */ + class GetCertificateAuthorityRequest implements IGetCertificateAuthorityRequest { + + /** + * Constructs a new GetCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest); + + /** GetCertificateAuthorityRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest): google.cloud.security.privateca.v1.GetCertificateAuthorityRequest; + + /** + * Encodes the specified GetCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateAuthorityRequest.verify|verify} messages. + * @param message GetCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateAuthorityRequest.verify|verify} messages. + * @param message GetCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.GetCertificateAuthorityRequest; + + /** + * Decodes a GetCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.GetCertificateAuthorityRequest; + + /** + * Verifies a GetCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.GetCertificateAuthorityRequest; + + /** + * Creates a plain object from a GetCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message GetCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.GetCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateAuthoritiesRequest. */ + interface IListCertificateAuthoritiesRequest { + + /** ListCertificateAuthoritiesRequest parent */ + parent?: (string|null); + + /** ListCertificateAuthoritiesRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificateAuthoritiesRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificateAuthoritiesRequest filter */ + filter?: (string|null); + + /** ListCertificateAuthoritiesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificateAuthoritiesRequest. */ + class ListCertificateAuthoritiesRequest implements IListCertificateAuthoritiesRequest { + + /** + * Constructs a new ListCertificateAuthoritiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest); + + /** ListCertificateAuthoritiesRequest parent. */ + public parent: string; + + /** ListCertificateAuthoritiesRequest pageSize. */ + public pageSize: number; + + /** ListCertificateAuthoritiesRequest pageToken. */ + public pageToken: string; + + /** ListCertificateAuthoritiesRequest filter. */ + public filter: string; + + /** ListCertificateAuthoritiesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificateAuthoritiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateAuthoritiesRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest): google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest; + + /** + * Encodes the specified ListCertificateAuthoritiesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @param message ListCertificateAuthoritiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateAuthoritiesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @param message ListCertificateAuthoritiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateAuthoritiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest; + + /** + * Decodes a ListCertificateAuthoritiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest; + + /** + * Verifies a ListCertificateAuthoritiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateAuthoritiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateAuthoritiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest; + + /** + * Creates a plain object from a ListCertificateAuthoritiesRequest message. Also converts values to other types if specified. + * @param message ListCertificateAuthoritiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateAuthoritiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateAuthoritiesResponse. */ + interface IListCertificateAuthoritiesResponse { + + /** ListCertificateAuthoritiesResponse certificateAuthorities */ + certificateAuthorities?: (google.cloud.security.privateca.v1.ICertificateAuthority[]|null); + + /** ListCertificateAuthoritiesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificateAuthoritiesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificateAuthoritiesResponse. */ + class ListCertificateAuthoritiesResponse implements IListCertificateAuthoritiesResponse { + + /** + * Constructs a new ListCertificateAuthoritiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse); + + /** ListCertificateAuthoritiesResponse certificateAuthorities. */ + public certificateAuthorities: google.cloud.security.privateca.v1.ICertificateAuthority[]; + + /** ListCertificateAuthoritiesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificateAuthoritiesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificateAuthoritiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateAuthoritiesResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse): google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse; + + /** + * Encodes the specified ListCertificateAuthoritiesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @param message ListCertificateAuthoritiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateAuthoritiesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @param message ListCertificateAuthoritiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateAuthoritiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse; + + /** + * Decodes a ListCertificateAuthoritiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse; + + /** + * Verifies a ListCertificateAuthoritiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateAuthoritiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateAuthoritiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse; + + /** + * Creates a plain object from a ListCertificateAuthoritiesResponse message. Also converts values to other types if specified. + * @param message ListCertificateAuthoritiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateAuthoritiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UndeleteCertificateAuthorityRequest. */ + interface IUndeleteCertificateAuthorityRequest { + + /** UndeleteCertificateAuthorityRequest name */ + name?: (string|null); + + /** UndeleteCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UndeleteCertificateAuthorityRequest. */ + class UndeleteCertificateAuthorityRequest implements IUndeleteCertificateAuthorityRequest { + + /** + * Constructs a new UndeleteCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest); + + /** UndeleteCertificateAuthorityRequest name. */ + public name: string; + + /** UndeleteCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new UndeleteCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UndeleteCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest): google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest; + + /** + * Encodes the specified UndeleteCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest.verify|verify} messages. + * @param message UndeleteCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UndeleteCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest.verify|verify} messages. + * @param message UndeleteCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UndeleteCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UndeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest; + + /** + * Decodes an UndeleteCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UndeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest; + + /** + * Verifies an UndeleteCertificateAuthorityRequest message. + * @param message Plain 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 UndeleteCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UndeleteCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest; + + /** + * Creates a plain object from an UndeleteCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message UndeleteCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UndeleteCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteCertificateAuthorityRequest. */ + interface IDeleteCertificateAuthorityRequest { + + /** DeleteCertificateAuthorityRequest name */ + name?: (string|null); + + /** DeleteCertificateAuthorityRequest requestId */ + requestId?: (string|null); + + /** DeleteCertificateAuthorityRequest ignoreActiveCertificates */ + ignoreActiveCertificates?: (boolean|null); + } + + /** Represents a DeleteCertificateAuthorityRequest. */ + class DeleteCertificateAuthorityRequest implements IDeleteCertificateAuthorityRequest { + + /** + * Constructs a new DeleteCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest); + + /** DeleteCertificateAuthorityRequest name. */ + public name: string; + + /** DeleteCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** DeleteCertificateAuthorityRequest ignoreActiveCertificates. */ + public ignoreActiveCertificates: boolean; + + /** + * Creates a new DeleteCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest): google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest; + + /** + * Encodes the specified DeleteCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest.verify|verify} messages. + * @param message DeleteCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest.verify|verify} messages. + * @param message DeleteCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest; + + /** + * Decodes a DeleteCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest; + + /** + * Verifies a DeleteCertificateAuthorityRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest; + + /** + * Creates a plain object from a DeleteCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message DeleteCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateAuthorityRequest. */ + interface IUpdateCertificateAuthorityRequest { + + /** UpdateCertificateAuthorityRequest certificateAuthority */ + certificateAuthority?: (google.cloud.security.privateca.v1.ICertificateAuthority|null); + + /** UpdateCertificateAuthorityRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateAuthorityRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateAuthorityRequest. */ + class UpdateCertificateAuthorityRequest implements IUpdateCertificateAuthorityRequest { + + /** + * Constructs a new UpdateCertificateAuthorityRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest); + + /** UpdateCertificateAuthorityRequest certificateAuthority. */ + public certificateAuthority?: (google.cloud.security.privateca.v1.ICertificateAuthority|null); + + /** UpdateCertificateAuthorityRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateAuthorityRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateAuthorityRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateAuthorityRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest): google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @param message UpdateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @param message UpdateCertificateAuthorityRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest; + + /** + * Verifies an UpdateCertificateAuthorityRequest message. + * @param message Plain 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 UpdateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateAuthorityRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest; + + /** + * Creates a plain object from an UpdateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateAuthorityRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateAuthorityRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCaPoolRequest. */ + interface ICreateCaPoolRequest { + + /** CreateCaPoolRequest parent */ + parent?: (string|null); + + /** CreateCaPoolRequest caPoolId */ + caPoolId?: (string|null); + + /** CreateCaPoolRequest caPool */ + caPool?: (google.cloud.security.privateca.v1.ICaPool|null); + + /** CreateCaPoolRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateCaPoolRequest. */ + class CreateCaPoolRequest implements ICreateCaPoolRequest { + + /** + * Constructs a new CreateCaPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICreateCaPoolRequest); + + /** CreateCaPoolRequest parent. */ + public parent: string; + + /** CreateCaPoolRequest caPoolId. */ + public caPoolId: string; + + /** CreateCaPoolRequest caPool. */ + public caPool?: (google.cloud.security.privateca.v1.ICaPool|null); + + /** CreateCaPoolRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateCaPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCaPoolRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICreateCaPoolRequest): google.cloud.security.privateca.v1.CreateCaPoolRequest; + + /** + * Encodes the specified CreateCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCaPoolRequest.verify|verify} messages. + * @param message CreateCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICreateCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCaPoolRequest.verify|verify} messages. + * @param message CreateCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICreateCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCaPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CreateCaPoolRequest; + + /** + * Decodes a CreateCaPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CreateCaPoolRequest; + + /** + * Verifies a CreateCaPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCaPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CreateCaPoolRequest; + + /** + * Creates a plain object from a CreateCaPoolRequest message. Also converts values to other types if specified. + * @param message CreateCaPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CreateCaPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCaPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCaPoolRequest. */ + interface IUpdateCaPoolRequest { + + /** UpdateCaPoolRequest caPool */ + caPool?: (google.cloud.security.privateca.v1.ICaPool|null); + + /** UpdateCaPoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCaPoolRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCaPoolRequest. */ + class UpdateCaPoolRequest implements IUpdateCaPoolRequest { + + /** + * Constructs a new UpdateCaPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IUpdateCaPoolRequest); + + /** UpdateCaPoolRequest caPool. */ + public caPool?: (google.cloud.security.privateca.v1.ICaPool|null); + + /** UpdateCaPoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCaPoolRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCaPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCaPoolRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IUpdateCaPoolRequest): google.cloud.security.privateca.v1.UpdateCaPoolRequest; + + /** + * Encodes the specified UpdateCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCaPoolRequest.verify|verify} messages. + * @param message UpdateCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IUpdateCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCaPoolRequest.verify|verify} messages. + * @param message UpdateCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IUpdateCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCaPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.UpdateCaPoolRequest; + + /** + * Decodes an UpdateCaPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.UpdateCaPoolRequest; + + /** + * Verifies an UpdateCaPoolRequest message. + * @param message Plain 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 UpdateCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCaPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.UpdateCaPoolRequest; + + /** + * Creates a plain object from an UpdateCaPoolRequest message. Also converts values to other types if specified. + * @param message UpdateCaPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.UpdateCaPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCaPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteCaPoolRequest. */ + interface IDeleteCaPoolRequest { + + /** DeleteCaPoolRequest name */ + name?: (string|null); + + /** DeleteCaPoolRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteCaPoolRequest. */ + class DeleteCaPoolRequest implements IDeleteCaPoolRequest { + + /** + * Constructs a new DeleteCaPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IDeleteCaPoolRequest); + + /** DeleteCaPoolRequest name. */ + public name: string; + + /** DeleteCaPoolRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteCaPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteCaPoolRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IDeleteCaPoolRequest): google.cloud.security.privateca.v1.DeleteCaPoolRequest; + + /** + * Encodes the specified DeleteCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCaPoolRequest.verify|verify} messages. + * @param message DeleteCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IDeleteCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCaPoolRequest.verify|verify} messages. + * @param message DeleteCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IDeleteCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteCaPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.DeleteCaPoolRequest; + + /** + * Decodes a DeleteCaPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.DeleteCaPoolRequest; + + /** + * Verifies a DeleteCaPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteCaPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.DeleteCaPoolRequest; + + /** + * Creates a plain object from a DeleteCaPoolRequest message. Also converts values to other types if specified. + * @param message DeleteCaPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.DeleteCaPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteCaPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchCaCertsRequest. */ + interface IFetchCaCertsRequest { + + /** FetchCaCertsRequest caPool */ + caPool?: (string|null); + + /** FetchCaCertsRequest requestId */ + requestId?: (string|null); + } + + /** Represents a FetchCaCertsRequest. */ + class FetchCaCertsRequest implements IFetchCaCertsRequest { + + /** + * Constructs a new FetchCaCertsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IFetchCaCertsRequest); + + /** FetchCaCertsRequest caPool. */ + public caPool: string; + + /** FetchCaCertsRequest requestId. */ + public requestId: string; + + /** + * Creates a new FetchCaCertsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchCaCertsRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IFetchCaCertsRequest): google.cloud.security.privateca.v1.FetchCaCertsRequest; + + /** + * Encodes the specified FetchCaCertsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsRequest.verify|verify} messages. + * @param message FetchCaCertsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IFetchCaCertsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchCaCertsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsRequest.verify|verify} messages. + * @param message FetchCaCertsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IFetchCaCertsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchCaCertsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchCaCertsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.FetchCaCertsRequest; + + /** + * Decodes a FetchCaCertsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchCaCertsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.FetchCaCertsRequest; + + /** + * Verifies a FetchCaCertsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchCaCertsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchCaCertsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.FetchCaCertsRequest; + + /** + * Creates a plain object from a FetchCaCertsRequest message. Also converts values to other types if specified. + * @param message FetchCaCertsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.FetchCaCertsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchCaCertsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FetchCaCertsResponse. */ + interface IFetchCaCertsResponse { + + /** FetchCaCertsResponse caCerts */ + caCerts?: (google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain[]|null); + } + + /** Represents a FetchCaCertsResponse. */ + class FetchCaCertsResponse implements IFetchCaCertsResponse { + + /** + * Constructs a new FetchCaCertsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IFetchCaCertsResponse); + + /** FetchCaCertsResponse caCerts. */ + public caCerts: google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain[]; + + /** + * Creates a new FetchCaCertsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchCaCertsResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IFetchCaCertsResponse): google.cloud.security.privateca.v1.FetchCaCertsResponse; + + /** + * Encodes the specified FetchCaCertsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.verify|verify} messages. + * @param message FetchCaCertsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IFetchCaCertsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchCaCertsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.verify|verify} messages. + * @param message FetchCaCertsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IFetchCaCertsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchCaCertsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchCaCertsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.FetchCaCertsResponse; + + /** + * Decodes a FetchCaCertsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchCaCertsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.FetchCaCertsResponse; + + /** + * Verifies a FetchCaCertsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchCaCertsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchCaCertsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.FetchCaCertsResponse; + + /** + * Creates a plain object from a FetchCaCertsResponse message. Also converts values to other types if specified. + * @param message FetchCaCertsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.FetchCaCertsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchCaCertsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FetchCaCertsResponse { + + /** Properties of a CertChain. */ + interface ICertChain { + + /** CertChain certificates */ + certificates?: (string[]|null); + } + + /** Represents a CertChain. */ + class CertChain implements ICertChain { + + /** + * Constructs a new CertChain. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain); + + /** CertChain certificates. */ + public certificates: string[]; + + /** + * Creates a new CertChain instance using the specified properties. + * @param [properties] Properties to set + * @returns CertChain instance + */ + public static create(properties?: google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain): google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain; + + /** + * Encodes the specified CertChain message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.verify|verify} messages. + * @param message CertChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.verify|verify} messages. + * @param message CertChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain; + + /** + * Verifies a CertChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertChain + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @param message CertChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GetCaPoolRequest. */ + interface IGetCaPoolRequest { + + /** GetCaPoolRequest name */ + name?: (string|null); + } + + /** Represents a GetCaPoolRequest. */ + class GetCaPoolRequest implements IGetCaPoolRequest { + + /** + * Constructs a new GetCaPoolRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IGetCaPoolRequest); + + /** GetCaPoolRequest name. */ + public name: string; + + /** + * Creates a new GetCaPoolRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCaPoolRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IGetCaPoolRequest): google.cloud.security.privateca.v1.GetCaPoolRequest; + + /** + * Encodes the specified GetCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCaPoolRequest.verify|verify} messages. + * @param message GetCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IGetCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCaPoolRequest.verify|verify} messages. + * @param message GetCaPoolRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IGetCaPoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCaPoolRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.GetCaPoolRequest; + + /** + * Decodes a GetCaPoolRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.GetCaPoolRequest; + + /** + * Verifies a GetCaPoolRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCaPoolRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.GetCaPoolRequest; + + /** + * Creates a plain object from a GetCaPoolRequest message. Also converts values to other types if specified. + * @param message GetCaPoolRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.GetCaPoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCaPoolRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCaPoolsRequest. */ + interface IListCaPoolsRequest { + + /** ListCaPoolsRequest parent */ + parent?: (string|null); + + /** ListCaPoolsRequest pageSize */ + pageSize?: (number|null); + + /** ListCaPoolsRequest pageToken */ + pageToken?: (string|null); + + /** ListCaPoolsRequest filter */ + filter?: (string|null); + + /** ListCaPoolsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCaPoolsRequest. */ + class ListCaPoolsRequest implements IListCaPoolsRequest { + + /** + * Constructs a new ListCaPoolsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCaPoolsRequest); + + /** ListCaPoolsRequest parent. */ + public parent: string; + + /** ListCaPoolsRequest pageSize. */ + public pageSize: number; + + /** ListCaPoolsRequest pageToken. */ + public pageToken: string; + + /** ListCaPoolsRequest filter. */ + public filter: string; + + /** ListCaPoolsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCaPoolsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCaPoolsRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCaPoolsRequest): google.cloud.security.privateca.v1.ListCaPoolsRequest; + + /** + * Encodes the specified ListCaPoolsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsRequest.verify|verify} messages. + * @param message ListCaPoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCaPoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCaPoolsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsRequest.verify|verify} messages. + * @param message ListCaPoolsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCaPoolsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCaPoolsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCaPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCaPoolsRequest; + + /** + * Decodes a ListCaPoolsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCaPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCaPoolsRequest; + + /** + * Verifies a ListCaPoolsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCaPoolsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCaPoolsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCaPoolsRequest; + + /** + * Creates a plain object from a ListCaPoolsRequest message. Also converts values to other types if specified. + * @param message ListCaPoolsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCaPoolsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCaPoolsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCaPoolsResponse. */ + interface IListCaPoolsResponse { + + /** ListCaPoolsResponse caPools */ + caPools?: (google.cloud.security.privateca.v1.ICaPool[]|null); + + /** ListCaPoolsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCaPoolsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCaPoolsResponse. */ + class ListCaPoolsResponse implements IListCaPoolsResponse { + + /** + * Constructs a new ListCaPoolsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCaPoolsResponse); + + /** ListCaPoolsResponse caPools. */ + public caPools: google.cloud.security.privateca.v1.ICaPool[]; + + /** ListCaPoolsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCaPoolsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCaPoolsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCaPoolsResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCaPoolsResponse): google.cloud.security.privateca.v1.ListCaPoolsResponse; + + /** + * Encodes the specified ListCaPoolsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.verify|verify} messages. + * @param message ListCaPoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCaPoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCaPoolsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.verify|verify} messages. + * @param message ListCaPoolsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCaPoolsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCaPoolsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCaPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCaPoolsResponse; + + /** + * Decodes a ListCaPoolsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCaPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCaPoolsResponse; + + /** + * Verifies a ListCaPoolsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCaPoolsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCaPoolsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCaPoolsResponse; + + /** + * Creates a plain object from a ListCaPoolsResponse message. Also converts values to other types if specified. + * @param message ListCaPoolsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCaPoolsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCaPoolsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateRevocationListRequest. */ + interface IGetCertificateRevocationListRequest { + + /** GetCertificateRevocationListRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateRevocationListRequest. */ + class GetCertificateRevocationListRequest implements IGetCertificateRevocationListRequest { + + /** + * Constructs a new GetCertificateRevocationListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest); + + /** GetCertificateRevocationListRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateRevocationListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateRevocationListRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest): google.cloud.security.privateca.v1.GetCertificateRevocationListRequest; + + /** + * Encodes the specified GetCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRevocationListRequest.verify|verify} messages. + * @param message GetCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRevocationListRequest.verify|verify} messages. + * @param message GetCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.GetCertificateRevocationListRequest; + + /** + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.GetCertificateRevocationListRequest; + + /** + * Verifies a GetCertificateRevocationListRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateRevocationListRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.GetCertificateRevocationListRequest; + + /** + * Creates a plain object from a GetCertificateRevocationListRequest message. Also converts values to other types if specified. + * @param message GetCertificateRevocationListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.GetCertificateRevocationListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateRevocationListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateRevocationListsRequest. */ + interface IListCertificateRevocationListsRequest { + + /** ListCertificateRevocationListsRequest parent */ + parent?: (string|null); + + /** ListCertificateRevocationListsRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificateRevocationListsRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificateRevocationListsRequest filter */ + filter?: (string|null); + + /** ListCertificateRevocationListsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificateRevocationListsRequest. */ + class ListCertificateRevocationListsRequest implements IListCertificateRevocationListsRequest { + + /** + * Constructs a new ListCertificateRevocationListsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest); + + /** ListCertificateRevocationListsRequest parent. */ + public parent: string; + + /** ListCertificateRevocationListsRequest pageSize. */ + public pageSize: number; + + /** ListCertificateRevocationListsRequest pageToken. */ + public pageToken: string; + + /** ListCertificateRevocationListsRequest filter. */ + public filter: string; + + /** ListCertificateRevocationListsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificateRevocationListsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateRevocationListsRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest): google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest; + + /** + * Encodes the specified ListCertificateRevocationListsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @param message ListCertificateRevocationListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateRevocationListsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @param message ListCertificateRevocationListsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateRevocationListsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest; + + /** + * Decodes a ListCertificateRevocationListsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest; + + /** + * Verifies a ListCertificateRevocationListsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateRevocationListsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateRevocationListsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest; + + /** + * Creates a plain object from a ListCertificateRevocationListsRequest message. Also converts values to other types if specified. + * @param message ListCertificateRevocationListsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateRevocationListsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateRevocationListsResponse. */ + interface IListCertificateRevocationListsResponse { + + /** ListCertificateRevocationListsResponse certificateRevocationLists */ + certificateRevocationLists?: (google.cloud.security.privateca.v1.ICertificateRevocationList[]|null); + + /** ListCertificateRevocationListsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificateRevocationListsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificateRevocationListsResponse. */ + class ListCertificateRevocationListsResponse implements IListCertificateRevocationListsResponse { + + /** + * Constructs a new ListCertificateRevocationListsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse); + + /** ListCertificateRevocationListsResponse certificateRevocationLists. */ + public certificateRevocationLists: google.cloud.security.privateca.v1.ICertificateRevocationList[]; + + /** ListCertificateRevocationListsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificateRevocationListsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificateRevocationListsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateRevocationListsResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse): google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse; + + /** + * Encodes the specified ListCertificateRevocationListsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @param message ListCertificateRevocationListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateRevocationListsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @param message ListCertificateRevocationListsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateRevocationListsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse; + + /** + * Decodes a ListCertificateRevocationListsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse; + + /** + * Verifies a ListCertificateRevocationListsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateRevocationListsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateRevocationListsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse; + + /** + * Creates a plain object from a ListCertificateRevocationListsResponse message. Also converts values to other types if specified. + * @param message ListCertificateRevocationListsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateRevocationListsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateRevocationListRequest. */ + interface IUpdateCertificateRevocationListRequest { + + /** UpdateCertificateRevocationListRequest certificateRevocationList */ + certificateRevocationList?: (google.cloud.security.privateca.v1.ICertificateRevocationList|null); + + /** UpdateCertificateRevocationListRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRevocationListRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateRevocationListRequest. */ + class UpdateCertificateRevocationListRequest implements IUpdateCertificateRevocationListRequest { + + /** + * Constructs a new UpdateCertificateRevocationListRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest); + + /** UpdateCertificateRevocationListRequest certificateRevocationList. */ + public certificateRevocationList?: (google.cloud.security.privateca.v1.ICertificateRevocationList|null); + + /** UpdateCertificateRevocationListRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateRevocationListRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateRevocationListRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateRevocationListRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest): google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @param message UpdateCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @param message UpdateCertificateRevocationListRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest; + + /** + * Verifies an UpdateCertificateRevocationListRequest message. + * @param message Plain 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 UpdateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateRevocationListRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest; + + /** + * Creates a plain object from an UpdateCertificateRevocationListRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateRevocationListRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateRevocationListRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CreateCertificateTemplateRequest. */ + interface ICreateCertificateTemplateRequest { + + /** CreateCertificateTemplateRequest parent */ + parent?: (string|null); + + /** CreateCertificateTemplateRequest certificateTemplateId */ + certificateTemplateId?: (string|null); + + /** CreateCertificateTemplateRequest certificateTemplate */ + certificateTemplate?: (google.cloud.security.privateca.v1.ICertificateTemplate|null); + + /** CreateCertificateTemplateRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateCertificateTemplateRequest. */ + class CreateCertificateTemplateRequest implements ICreateCertificateTemplateRequest { + + /** + * Constructs a new CreateCertificateTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest); + + /** CreateCertificateTemplateRequest parent. */ + public parent: string; + + /** CreateCertificateTemplateRequest certificateTemplateId. */ + public certificateTemplateId: string; + + /** CreateCertificateTemplateRequest certificateTemplate. */ + public certificateTemplate?: (google.cloud.security.privateca.v1.ICertificateTemplate|null); + + /** CreateCertificateTemplateRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateCertificateTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCertificateTemplateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest): google.cloud.security.privateca.v1.CreateCertificateTemplateRequest; + + /** + * Encodes the specified CreateCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateTemplateRequest.verify|verify} messages. + * @param message CreateCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateTemplateRequest.verify|verify} messages. + * @param message CreateCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCertificateTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CreateCertificateTemplateRequest; + + /** + * Decodes a CreateCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CreateCertificateTemplateRequest; + + /** + * Verifies a CreateCertificateTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCertificateTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CreateCertificateTemplateRequest; + + /** + * Creates a plain object from a CreateCertificateTemplateRequest message. Also converts values to other types if specified. + * @param message CreateCertificateTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CreateCertificateTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCertificateTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DeleteCertificateTemplateRequest. */ + interface IDeleteCertificateTemplateRequest { + + /** DeleteCertificateTemplateRequest name */ + name?: (string|null); + + /** DeleteCertificateTemplateRequest requestId */ + requestId?: (string|null); + } + + /** Represents a DeleteCertificateTemplateRequest. */ + class DeleteCertificateTemplateRequest implements IDeleteCertificateTemplateRequest { + + /** + * Constructs a new DeleteCertificateTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest); + + /** DeleteCertificateTemplateRequest name. */ + public name: string; + + /** DeleteCertificateTemplateRequest requestId. */ + public requestId: string; + + /** + * Creates a new DeleteCertificateTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteCertificateTemplateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest): google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest; + + /** + * Encodes the specified DeleteCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest.verify|verify} messages. + * @param message DeleteCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest.verify|verify} messages. + * @param message DeleteCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteCertificateTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest; + + /** + * Decodes a DeleteCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest; + + /** + * Verifies a DeleteCertificateTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteCertificateTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest; + + /** + * Creates a plain object from a DeleteCertificateTemplateRequest message. Also converts values to other types if specified. + * @param message DeleteCertificateTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteCertificateTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a GetCertificateTemplateRequest. */ + interface IGetCertificateTemplateRequest { + + /** GetCertificateTemplateRequest name */ + name?: (string|null); + } + + /** Represents a GetCertificateTemplateRequest. */ + class GetCertificateTemplateRequest implements IGetCertificateTemplateRequest { + + /** + * Constructs a new GetCertificateTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IGetCertificateTemplateRequest); + + /** GetCertificateTemplateRequest name. */ + public name: string; + + /** + * Creates a new GetCertificateTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCertificateTemplateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IGetCertificateTemplateRequest): google.cloud.security.privateca.v1.GetCertificateTemplateRequest; + + /** + * Encodes the specified GetCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateTemplateRequest.verify|verify} messages. + * @param message GetCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateTemplateRequest.verify|verify} messages. + * @param message GetCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCertificateTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.GetCertificateTemplateRequest; + + /** + * Decodes a GetCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.GetCertificateTemplateRequest; + + /** + * Verifies a GetCertificateTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCertificateTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.GetCertificateTemplateRequest; + + /** + * Creates a plain object from a GetCertificateTemplateRequest message. Also converts values to other types if specified. + * @param message GetCertificateTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.GetCertificateTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCertificateTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateTemplatesRequest. */ + interface IListCertificateTemplatesRequest { + + /** ListCertificateTemplatesRequest parent */ + parent?: (string|null); + + /** ListCertificateTemplatesRequest pageSize */ + pageSize?: (number|null); + + /** ListCertificateTemplatesRequest pageToken */ + pageToken?: (string|null); + + /** ListCertificateTemplatesRequest filter */ + filter?: (string|null); + + /** ListCertificateTemplatesRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListCertificateTemplatesRequest. */ + class ListCertificateTemplatesRequest implements IListCertificateTemplatesRequest { + + /** + * Constructs a new ListCertificateTemplatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificateTemplatesRequest); + + /** ListCertificateTemplatesRequest parent. */ + public parent: string; + + /** ListCertificateTemplatesRequest pageSize. */ + public pageSize: number; + + /** ListCertificateTemplatesRequest pageToken. */ + public pageToken: string; + + /** ListCertificateTemplatesRequest filter. */ + public filter: string; + + /** ListCertificateTemplatesRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListCertificateTemplatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateTemplatesRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificateTemplatesRequest): google.cloud.security.privateca.v1.ListCertificateTemplatesRequest; + + /** + * Encodes the specified ListCertificateTemplatesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesRequest.verify|verify} messages. + * @param message ListCertificateTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesRequest.verify|verify} messages. + * @param message ListCertificateTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateTemplatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificateTemplatesRequest; + + /** + * Decodes a ListCertificateTemplatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificateTemplatesRequest; + + /** + * Verifies a ListCertificateTemplatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateTemplatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificateTemplatesRequest; + + /** + * Creates a plain object from a ListCertificateTemplatesRequest message. Also converts values to other types if specified. + * @param message ListCertificateTemplatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificateTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateTemplatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ListCertificateTemplatesResponse. */ + interface IListCertificateTemplatesResponse { + + /** ListCertificateTemplatesResponse certificateTemplates */ + certificateTemplates?: (google.cloud.security.privateca.v1.ICertificateTemplate[]|null); + + /** ListCertificateTemplatesResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListCertificateTemplatesResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListCertificateTemplatesResponse. */ + class ListCertificateTemplatesResponse implements IListCertificateTemplatesResponse { + + /** + * Constructs a new ListCertificateTemplatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IListCertificateTemplatesResponse); + + /** ListCertificateTemplatesResponse certificateTemplates. */ + public certificateTemplates: google.cloud.security.privateca.v1.ICertificateTemplate[]; + + /** ListCertificateTemplatesResponse nextPageToken. */ + public nextPageToken: string; + + /** ListCertificateTemplatesResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListCertificateTemplatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCertificateTemplatesResponse instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IListCertificateTemplatesResponse): google.cloud.security.privateca.v1.ListCertificateTemplatesResponse; + + /** + * Encodes the specified ListCertificateTemplatesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.verify|verify} messages. + * @param message ListCertificateTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IListCertificateTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCertificateTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.verify|verify} messages. + * @param message ListCertificateTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IListCertificateTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCertificateTemplatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCertificateTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.ListCertificateTemplatesResponse; + + /** + * Decodes a ListCertificateTemplatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCertificateTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.ListCertificateTemplatesResponse; + + /** + * Verifies a ListCertificateTemplatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCertificateTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCertificateTemplatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.ListCertificateTemplatesResponse; + + /** + * Creates a plain object from a ListCertificateTemplatesResponse message. Also converts values to other types if specified. + * @param message ListCertificateTemplatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.ListCertificateTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCertificateTemplatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UpdateCertificateTemplateRequest. */ + interface IUpdateCertificateTemplateRequest { + + /** UpdateCertificateTemplateRequest certificateTemplate */ + certificateTemplate?: (google.cloud.security.privateca.v1.ICertificateTemplate|null); + + /** UpdateCertificateTemplateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateTemplateRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateCertificateTemplateRequest. */ + class UpdateCertificateTemplateRequest implements IUpdateCertificateTemplateRequest { + + /** + * Constructs a new UpdateCertificateTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest); + + /** UpdateCertificateTemplateRequest certificateTemplate. */ + public certificateTemplate?: (google.cloud.security.privateca.v1.ICertificateTemplate|null); + + /** UpdateCertificateTemplateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateCertificateTemplateRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateCertificateTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCertificateTemplateRequest instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest): google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest; + + /** + * Encodes the specified UpdateCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest.verify|verify} messages. + * @param message UpdateCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest.verify|verify} messages. + * @param message UpdateCertificateTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCertificateTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest; + + /** + * Decodes an UpdateCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest; + + /** + * Verifies an UpdateCertificateTemplateRequest message. + * @param message Plain 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 UpdateCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCertificateTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest; + + /** + * Creates a plain object from an UpdateCertificateTemplateRequest message. Also converts values to other types if specified. + * @param message UpdateCertificateTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCertificateTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target */ + target?: (string|null); + + /** OperationMetadata verb */ + verb?: (string|null); + + /** OperationMetadata statusMessage */ + statusMessage?: (string|null); + + /** OperationMetadata requestedCancellation */ + requestedCancellation?: (boolean|null); + + /** OperationMetadata apiVersion */ + apiVersion?: (string|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.IOperationMetadata); + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata target. */ + public target: string; + + /** OperationMetadata verb. */ + public verb: string; + + /** OperationMetadata statusMessage. */ + public statusMessage: string; + + /** OperationMetadata requestedCancellation. */ + public requestedCancellation: boolean; + + /** OperationMetadata apiVersion. */ + public apiVersion: string; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.security.privateca.v1.IOperationMetadata): google.cloud.security.privateca.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.security.privateca.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.OperationMetadata.verify|verify} messages. + * @param message OperationMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.OperationMetadata; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.OperationMetadata; + + /** + * Verifies an OperationMetadata message. + * @param message Plain 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 OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.OperationMetadata; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @param message OperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.OperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Properties of a CertificateAuthority. */ + interface ICertificateAuthority { + + /** CertificateAuthority name */ + name?: (string|null); + + /** CertificateAuthority type */ + type?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|null); + + /** CertificateAuthority tier */ + tier?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|null); + + /** CertificateAuthority config */ + config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + + /** CertificateAuthority lifetime */ + lifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthority keySpec */ + keySpec?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null); + + /** CertificateAuthority certificatePolicy */ + certificatePolicy?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null); + + /** CertificateAuthority issuingOptions */ + issuingOptions?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null); + + /** CertificateAuthority subordinateConfig */ + subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + + /** CertificateAuthority state */ + state?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.State|null); + + /** CertificateAuthority pemCaCertificates */ + pemCaCertificates?: (string[]|null); + + /** CertificateAuthority caCertificateDescriptions */ + caCertificateDescriptions?: (google.cloud.security.privateca.v1beta1.ICertificateDescription[]|null); + + /** CertificateAuthority gcsBucket */ + gcsBucket?: (string|null); + + /** CertificateAuthority accessUrls */ + accessUrls?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null); + + /** CertificateAuthority createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a CertificateAuthority. */ + class CertificateAuthority implements ICertificateAuthority { + + /** + * Constructs a new CertificateAuthority. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.ICertificateAuthority); + + /** CertificateAuthority name. */ + public name: string; + + /** CertificateAuthority type. */ + public type: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Type); + + /** CertificateAuthority tier. */ + public tier: (google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier); + + /** CertificateAuthority config. */ + public config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); + + /** CertificateAuthority lifetime. */ + public lifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthority keySpec. */ + public keySpec?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null); + + /** CertificateAuthority certificatePolicy. */ + public certificatePolicy?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null); + + /** CertificateAuthority issuingOptions. */ + public issuingOptions?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null); + + /** CertificateAuthority subordinateConfig. */ + public subordinateConfig?: (google.cloud.security.privateca.v1beta1.ISubordinateConfig|null); + + /** CertificateAuthority state. */ + public state: (google.cloud.security.privateca.v1beta1.CertificateAuthority.State|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.State); + + /** CertificateAuthority pemCaCertificates. */ + public pemCaCertificates: string[]; + + /** CertificateAuthority caCertificateDescriptions. */ + public caCertificateDescriptions: google.cloud.security.privateca.v1beta1.ICertificateDescription[]; + + /** CertificateAuthority gcsBucket. */ + public gcsBucket: string; + + /** CertificateAuthority accessUrls. */ + public accessUrls?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null); + + /** CertificateAuthority createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** CertificateAuthority labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new CertificateAuthority instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateAuthority instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.ICertificateAuthority): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @param message CertificateAuthority message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @param message CertificateAuthority message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.ICertificateAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Verifies a CertificateAuthority message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateAuthority message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateAuthority + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority; + + /** + * Creates a plain object from a CertificateAuthority message. Also converts values to other types if specified. + * @param message CertificateAuthority + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateAuthority to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateAuthority { + + /** Properties of an IssuingOptions. */ + interface IIssuingOptions { + + /** IssuingOptions includeCaCertUrl */ + includeCaCertUrl?: (boolean|null); + + /** IssuingOptions includeCrlAccessUrl */ + includeCrlAccessUrl?: (boolean|null); + } + + /** Represents an IssuingOptions. */ + class IssuingOptions implements IIssuingOptions { + + /** + * Constructs a new IssuingOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions); + + /** IssuingOptions includeCaCertUrl. */ + public includeCaCertUrl: boolean; + + /** IssuingOptions includeCrlAccessUrl. */ + public includeCrlAccessUrl: boolean; + + /** + * Creates a new IssuingOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns IssuingOptions instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Encodes the specified IssuingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @param message IssuingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssuingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @param message IssuingOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Verifies an IssuingOptions message. + * @param message Plain 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 IssuingOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssuingOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions; + + /** + * Creates a plain object from an IssuingOptions message. Also converts values to other types if specified. + * @param message IssuingOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssuingOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CertificateAuthorityPolicy. */ + interface ICertificateAuthorityPolicy { + + /** CertificateAuthorityPolicy allowedConfigList */ + allowedConfigList?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null); + + /** CertificateAuthorityPolicy overwriteConfigValues */ + overwriteConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); + + /** CertificateAuthorityPolicy allowedLocationsAndOrganizations */ + allowedLocationsAndOrganizations?: (google.cloud.security.privateca.v1beta1.ISubject[]|null); + + /** CertificateAuthorityPolicy allowedCommonNames */ + allowedCommonNames?: (string[]|null); + + /** CertificateAuthorityPolicy allowedSans */ + allowedSans?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null); + + /** CertificateAuthorityPolicy maximumLifetime */ + maximumLifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthorityPolicy allowedIssuanceModes */ + allowedIssuanceModes?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null); + } + + /** Represents a CertificateAuthorityPolicy. */ + class CertificateAuthorityPolicy implements ICertificateAuthorityPolicy { + + /** + * Constructs a new CertificateAuthorityPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy); + + /** CertificateAuthorityPolicy allowedConfigList. */ + public allowedConfigList?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null); + + /** CertificateAuthorityPolicy overwriteConfigValues. */ + public overwriteConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null); + + /** CertificateAuthorityPolicy allowedLocationsAndOrganizations. */ + public allowedLocationsAndOrganizations: google.cloud.security.privateca.v1beta1.ISubject[]; + + /** CertificateAuthorityPolicy allowedCommonNames. */ + public allowedCommonNames: string[]; + + /** CertificateAuthorityPolicy allowedSans. */ + public allowedSans?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null); + + /** CertificateAuthorityPolicy maximumLifetime. */ + public maximumLifetime?: (google.protobuf.IDuration|null); + + /** CertificateAuthorityPolicy allowedIssuanceModes. */ + public allowedIssuanceModes?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null); + + /** CertificateAuthorityPolicy configPolicy. */ + public configPolicy?: ("allowedConfigList"|"overwriteConfigValues"); + + /** + * Creates a new CertificateAuthorityPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns CertificateAuthorityPolicy instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Encodes the specified CertificateAuthorityPolicy message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @param message CertificateAuthorityPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CertificateAuthorityPolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @param message CertificateAuthorityPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CertificateAuthorityPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Decodes a CertificateAuthorityPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CertificateAuthorityPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Verifies a CertificateAuthorityPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CertificateAuthorityPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CertificateAuthorityPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy; + + /** + * Creates a plain object from a CertificateAuthorityPolicy message. Also converts values to other types if specified. + * @param message CertificateAuthorityPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CertificateAuthorityPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace CertificateAuthorityPolicy { + + /** Properties of an AllowedConfigList. */ + interface IAllowedConfigList { + + /** AllowedConfigList allowedConfigValues */ + allowedConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigWrapper[]|null); + } + + /** Represents an AllowedConfigList. */ + class AllowedConfigList implements IAllowedConfigList { + + /** + * Constructs a new AllowedConfigList. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList); + + /** AllowedConfigList allowedConfigValues. */ + public allowedConfigValues: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper[]; + + /** + * Creates a new AllowedConfigList instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedConfigList instance + */ + public static create(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList): google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList; + + /** + * Encodes the specified AllowedConfigList message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.verify|verify} messages. + * @param message AllowedConfigList message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ @@ -9706,982 +18099,1252 @@ export namespace google { /** * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ServiceOptions + * @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); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|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.ServiceOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; /** - * Verifies a ServiceOptions message. + * 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 a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * 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.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a MethodOptions. */ - interface IMethodOptions { + namespace UninterpretedOption { - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of a NamePart. */ + interface INamePart { - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + /** NamePart namePart */ + namePart: string; - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** NamePart isExtension */ + isExtension: boolean; + } - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** Represents a NamePart. */ + class NamePart implements INamePart { - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + /** 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 }; + } } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new MethodOptions. + * Constructs a new SourceCodeInfo. * @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); + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a new MethodOptions instance using the specified properties. + * Creates a new SourceCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns MethodOptions instance + * @returns SourceCodeInfo instance */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode + * 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.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ISourceCodeInfo, 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 + * 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.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodOptions message from the specified reader or buffer. + * 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 MethodOptions + * @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.MethodOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodOptions + * @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.MethodOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; /** - * Verifies a MethodOptions message. + * 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * 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.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace MethodOptions { + namespace SourceCodeInfo { - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 + /** 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); } - } - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** 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; - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** + * 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; - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** + * 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; - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); + /** + * 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); - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|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; - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** + * 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 }; - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|string|null); + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Constructs a new UninterpretedOption. + * Constructs a new GeneratedCodeInfo. * @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); + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a new UninterpretedOption instance using the specified properties. + * Creates a new GeneratedCodeInfo instance using the specified properties. * @param [properties] Properties to set - * @returns UninterpretedOption instance + * @returns GeneratedCodeInfo instance */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode + * 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.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IGeneratedCodeInfo, 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 + * 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.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UninterpretedOption message from the specified reader or buffer. + * 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 UninterpretedOption + * @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.UninterpretedOption; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UninterpretedOption + * @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.UninterpretedOption; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; /** - * Verifies an UninterpretedOption message. + * 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 an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * 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.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace UninterpretedOption { + namespace GeneratedCodeInfo { - /** Properties of a NamePart. */ - interface INamePart { + /** Properties of an Annotation. */ + interface IAnnotation { - /** NamePart namePart */ - namePart: string; + /** Annotation path */ + path?: (number[]|null); - /** NamePart isExtension */ - isExtension: boolean; + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); } - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** Represents an Annotation. */ + class Annotation implements IAnnotation { /** - * Constructs a new NamePart. + * Constructs a new Annotation. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** NamePart namePart. */ - public namePart: string; + /** Annotation path. */ + public path: number[]; - /** NamePart isExtension. */ - public isExtension: boolean; + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; /** - * Creates a new NamePart instance using the specified properties. + * Creates a new Annotation instance using the specified properties. * @param [properties] Properties to set - * @returns NamePart instance + * @returns Annotation instance */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; /** - * 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 + * 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.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, 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 + * 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.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NamePart message from the specified reader or buffer. + * 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 NamePart + * @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.UninterpretedOption.NamePart; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. + * Decodes an Annotation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NamePart + * @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.UninterpretedOption.NamePart; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Verifies a NamePart message. + * 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 a NamePart message from a plain object. Also converts values to their respective internal types. + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns NamePart + * @returns Annotation */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart + * 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.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this NamePart to JSON. + * Converts this Annotation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of a Duration. */ + interface IDuration { - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); } - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new SourceCodeInfo. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + constructor(properties?: google.protobuf.IDuration); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; /** - * Creates a new SourceCodeInfo instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns SourceCodeInfo instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode + * 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.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, 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 + * 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.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. + * 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 SourceCodeInfo + * @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.SourceCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo + * @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.SourceCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a SourceCodeInfo message. + * 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * 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.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this Duration 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 { + /** Properties of a Timestamp. */ + interface ITimestamp { - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** Timestamp seconds */ + seconds?: (number|Long|string|null); - /** Location path. */ - public path: number[]; + /** Timestamp nanos */ + nanos?: (number|null); + } - /** Location span. */ - public span: number[]; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** Location leadingComments. */ - public leadingComments: string; + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); - /** Location trailingComments. */ - public trailingComments: string; + /** Timestamp seconds. */ + public seconds: (number|Long|string); - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** Timestamp nanos. */ + public nanos: number; - /** - * 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; + /** + * 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 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 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 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; + /** + * 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 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 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 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; + /** + * 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 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); + /** + * 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 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 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 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 }; + /** + * 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 Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; } - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Properties of an Any. */ + interface IAny { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|string|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** Any value. */ + public value: (Uint8Array|string); /** - * Creates a new GeneratedCodeInfo instance using the specified properties. + * Creates a new Any instance using the specified properties. * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance + * @returns Any instance */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode + * 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.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IAny, 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 + * 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.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * 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 GeneratedCodeInfo + * @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.GeneratedCodeInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * Decodes an Any message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo + * @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.GeneratedCodeInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; /** - * Verifies a GeneratedCodeInfo message. + * 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 a GeneratedCodeInfo 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. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * 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.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this Any 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); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new Duration. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a new Duration instance using the specified properties. + * Creates a new Empty instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Empty instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IEmpty, 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 + * 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * 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 Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes an Empty message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; /** - * Verifies a Duration message. + * 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 a Duration message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Timestamp nanos */ - nanos?: (number|null); + /** FieldMask paths */ + paths?: (string[]|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { /** - * Constructs a new Timestamp. + * Constructs a new FieldMask. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns FieldMask instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IFieldMask, 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 + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @returns FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; /** - * Verifies a Timestamp message. + * Verifies a FieldMask message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns FieldMask */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this FieldMask to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; @@ -11496,272 +20159,114 @@ 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; + /** Namespace type. */ + namespace type { - /** - * 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); + /** Properties of an Expr. */ + interface IExpr { - /** - * 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; + /** Expr expression */ + expression?: (string|null); - /** - * 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 }; + /** Expr title */ + title?: (string|null); - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Expr description */ + description?: (string|null); - /** Properties of an Empty. */ - interface IEmpty { + /** Expr location */ + location?: (string|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** Represents an Expr. */ + class Expr implements IExpr { /** - * Creates a new Empty instance using the specified properties. + * Constructs a new Expr. * @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 }; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { + constructor(properties?: google.type.IExpr); - /** FieldMask paths */ - paths?: (string[]|null); - } + /** Expr expression. */ + public expression: string; - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** Expr title. */ + public title: string; - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); + /** Expr description. */ + public description: string; - /** FieldMask paths. */ - public paths: string[]; + /** Expr location. */ + public location: string; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Expr instance using the specified properties. * @param [properties] Properties to set - * @returns FieldMask instance + * @returns Expr instance */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + public static create(properties?: google.type.IExpr): google.type.Expr; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. + * @param message Expr message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.type.IExpr, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Expr message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns FieldMask + * @returns Expr * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Expr; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Expr message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns FieldMask + * @returns Expr * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Expr; /** - * Verifies a FieldMask message. + * Verifies an Expr message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Expr message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldMask + * @returns Expr */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + public static fromObject(object: { [k: string]: any }): google.type.Expr; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask + * Creates a plain object from an Expr message. Also converts values to other types if specified. + * @param message Expr * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.Expr, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldMask to JSON. + * Converts this Expr to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/packages/google-cloud-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index eeead1d9eb7..af56886e0ad 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -66,48 +66,47 @@ */ var privateca = {}; - privateca.v1beta1 = (function() { + privateca.v1 = (function() { /** - * Namespace v1beta1. + * Namespace v1. * @memberof google.cloud.security.privateca * @namespace */ - var v1beta1 = {}; + var v1 = {}; - v1beta1.CertificateAuthority = (function() { + v1.CertificateAuthority = (function() { /** * Properties of a CertificateAuthority. - * @memberof google.cloud.security.privateca.v1beta1 + * @memberof google.cloud.security.privateca.v1 * @interface ICertificateAuthority * @property {string|null} [name] CertificateAuthority name - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|null} [type] CertificateAuthority type - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|null} [tier] CertificateAuthority tier - * @property {google.cloud.security.privateca.v1beta1.ICertificateConfig|null} [config] CertificateAuthority config + * @property {google.cloud.security.privateca.v1.CertificateAuthority.Type|null} [type] CertificateAuthority type + * @property {google.cloud.security.privateca.v1.ICertificateConfig|null} [config] CertificateAuthority config * @property {google.protobuf.IDuration|null} [lifetime] CertificateAuthority lifetime - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null} [keySpec] CertificateAuthority keySpec - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null} [certificatePolicy] CertificateAuthority certificatePolicy - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null} [issuingOptions] CertificateAuthority issuingOptions - * @property {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null} [subordinateConfig] CertificateAuthority subordinateConfig - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.State|null} [state] CertificateAuthority state + * @property {google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec|null} [keySpec] CertificateAuthority keySpec + * @property {google.cloud.security.privateca.v1.ISubordinateConfig|null} [subordinateConfig] CertificateAuthority subordinateConfig + * @property {google.cloud.security.privateca.v1.CaPool.Tier|null} [tier] CertificateAuthority tier + * @property {google.cloud.security.privateca.v1.CertificateAuthority.State|null} [state] CertificateAuthority state * @property {Array.|null} [pemCaCertificates] CertificateAuthority pemCaCertificates - * @property {Array.|null} [caCertificateDescriptions] CertificateAuthority caCertificateDescriptions + * @property {Array.|null} [caCertificateDescriptions] CertificateAuthority caCertificateDescriptions * @property {string|null} [gcsBucket] CertificateAuthority gcsBucket - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null} [accessUrls] CertificateAuthority accessUrls + * @property {google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls|null} [accessUrls] CertificateAuthority accessUrls * @property {google.protobuf.ITimestamp|null} [createTime] CertificateAuthority createTime * @property {google.protobuf.ITimestamp|null} [updateTime] CertificateAuthority updateTime * @property {google.protobuf.ITimestamp|null} [deleteTime] CertificateAuthority deleteTime + * @property {google.protobuf.ITimestamp|null} [expireTime] CertificateAuthority expireTime * @property {Object.|null} [labels] CertificateAuthority labels */ /** * Constructs a new CertificateAuthority. - * @memberof google.cloud.security.privateca.v1beta1 + * @memberof google.cloud.security.privateca.v1 * @classdesc Represents a CertificateAuthority. * @implements ICertificateAuthority * @constructor - * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority=} [properties] Properties to set + * @param {google.cloud.security.privateca.v1.ICertificateAuthority=} [properties] Properties to set */ function CertificateAuthority(properties) { this.pemCaCertificates = []; @@ -122,31 +121,23 @@ /** * CertificateAuthority name. * @member {string} name - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.name = ""; /** * CertificateAuthority type. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.Type} type - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @member {google.cloud.security.privateca.v1.CertificateAuthority.Type} type + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.type = 0; - /** - * CertificateAuthority tier. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier} tier - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority - * @instance - */ - CertificateAuthority.prototype.tier = 0; - /** * CertificateAuthority config. - * @member {google.cloud.security.privateca.v1beta1.ICertificateConfig|null|undefined} config - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @member {google.cloud.security.privateca.v1.ICertificateConfig|null|undefined} config + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.config = null; @@ -154,47 +145,39 @@ /** * CertificateAuthority lifetime. * @member {google.protobuf.IDuration|null|undefined} lifetime - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.lifetime = null; /** * CertificateAuthority keySpec. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null|undefined} keySpec - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @member {google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec|null|undefined} keySpec + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.keySpec = null; /** - * CertificateAuthority certificatePolicy. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null|undefined} certificatePolicy - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority - * @instance - */ - CertificateAuthority.prototype.certificatePolicy = null; - - /** - * CertificateAuthority issuingOptions. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null|undefined} issuingOptions - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * CertificateAuthority subordinateConfig. + * @member {google.cloud.security.privateca.v1.ISubordinateConfig|null|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ - CertificateAuthority.prototype.issuingOptions = null; + CertificateAuthority.prototype.subordinateConfig = null; /** - * CertificateAuthority subordinateConfig. - * @member {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null|undefined} subordinateConfig - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * CertificateAuthority tier. + * @member {google.cloud.security.privateca.v1.CaPool.Tier} tier + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ - CertificateAuthority.prototype.subordinateConfig = null; + CertificateAuthority.prototype.tier = 0; /** * CertificateAuthority state. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.State} state - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @member {google.cloud.security.privateca.v1.CertificateAuthority.State} state + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.state = 0; @@ -202,15 +185,15 @@ /** * CertificateAuthority pemCaCertificates. * @member {Array.} pemCaCertificates - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.pemCaCertificates = $util.emptyArray; /** * CertificateAuthority caCertificateDescriptions. - * @member {Array.} caCertificateDescriptions - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @member {Array.} caCertificateDescriptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.caCertificateDescriptions = $util.emptyArray; @@ -218,15 +201,15 @@ /** * CertificateAuthority gcsBucket. * @member {string} gcsBucket - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.gcsBucket = ""; /** * CertificateAuthority accessUrls. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null|undefined} accessUrls - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @member {google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls|null|undefined} accessUrls + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.accessUrls = null; @@ -234,7 +217,7 @@ /** * CertificateAuthority createTime. * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.createTime = null; @@ -242,7 +225,7 @@ /** * CertificateAuthority updateTime. * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.updateTime = null; @@ -250,15 +233,23 @@ /** * CertificateAuthority deleteTime. * @member {google.protobuf.ITimestamp|null|undefined} deleteTime - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.deleteTime = null; + /** + * CertificateAuthority expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.cloud.security.privateca.v1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.expireTime = null; + /** * CertificateAuthority labels. * @member {Object.} labels - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance */ CertificateAuthority.prototype.labels = $util.emptyObject; @@ -266,21 +257,21 @@ /** * Creates a new CertificateAuthority instance using the specified properties. * @function create - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static - * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority instance + * @param {google.cloud.security.privateca.v1.ICertificateAuthority=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateAuthority} CertificateAuthority instance */ CertificateAuthority.create = function create(properties) { return new CertificateAuthority(properties); }; /** - * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.verify|verify} messages. * @function encode - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static - * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority} message CertificateAuthority message or plain object to encode + * @param {google.cloud.security.privateca.v1.ICertificateAuthority} message CertificateAuthority message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -291,50 +282,48 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tier); if (message.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.security.privateca.v1beta1.CertificateConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + $root.google.cloud.security.privateca.v1.CertificateConfig.encode(message.config, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) - $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.keySpec != null && Object.hasOwnProperty.call(message, "keySpec")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.encode(message.keySpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.certificatePolicy != null && Object.hasOwnProperty.call(message, "certificatePolicy")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.encode(message.certificatePolicy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.issuingOptions != null && Object.hasOwnProperty.call(message, "issuingOptions")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.encode(message.issuingOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.encode(message.keySpec, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.subordinateConfig != null && Object.hasOwnProperty.call(message, "subordinateConfig")) + $root.google.cloud.security.privateca.v1.SubordinateConfig.encode(message.subordinateConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.tier); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.state); if (message.pemCaCertificates != null && message.pemCaCertificates.length) for (var i = 0; i < message.pemCaCertificates.length; ++i) writer.uint32(/* id 9, wireType 2 =*/74).string(message.pemCaCertificates[i]); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); if (message.caCertificateDescriptions != null && message.caCertificateDescriptions.length) for (var i = 0; i < message.caCertificateDescriptions.length; ++i) - $root.google.cloud.security.privateca.v1beta1.CertificateDescription.encode(message.caCertificateDescriptions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.cloud.security.privateca.v1.CertificateDescription.encode(message.caCertificateDescriptions[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.gcsBucket); + writer.uint32(/* id 11, wireType 2 =*/90).string(message.gcsBucket); if (message.accessUrls != null && Object.hasOwnProperty.call(message, "accessUrls")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.encode(message.accessUrls, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.encode(message.accessUrls, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 16, wireType 2 =*/130).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 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.subordinateConfig != null && Object.hasOwnProperty.call(message, "subordinateConfig")) - $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.encode(message.subordinateConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static - * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority} message CertificateAuthority message or plain object to encode + * @param {google.cloud.security.privateca.v1.ICertificateAuthority} message CertificateAuthority message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -345,18 +334,18 @@ /** * Decodes a CertificateAuthority message from the specified reader or buffer. * @function decode - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @returns {google.cloud.security.privateca.v1.CertificateAuthority} CertificateAuthority * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CertificateAuthority.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateAuthority(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -367,27 +356,21 @@ message.type = reader.int32(); break; case 3: - message.tier = reader.int32(); + message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.decode(reader, reader.uint32()); break; case 4: - message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; case 5: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.keySpec = $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); break; case 6: - message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); + message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.decode(reader, reader.uint32()); break; case 7: - message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.decode(reader, reader.uint32()); + message.tier = reader.int32(); break; case 8: - message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.decode(reader, reader.uint32()); - break; - case 19: - message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); - break; - case 10: message.state = reader.int32(); break; case 9: @@ -395,27 +378,30 @@ message.pemCaCertificates = []; message.pemCaCertificates.push(reader.string()); break; - case 12: + case 10: if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) message.caCertificateDescriptions = []; - message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32())); + message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1.CertificateDescription.decode(reader, reader.uint32())); break; - case 13: + case 11: message.gcsBucket = reader.string(); break; - case 14: - message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); + case 12: + message.accessUrls = $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); break; - case 15: + case 13: message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 16: + case 14: message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 17: + case 15: message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; - case 18: + case 16: + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: if (message.labels === $util.emptyObject) message.labels = {}; var end2 = reader.uint32() + reader.pos; @@ -448,10 +434,10 @@ /** * Decodes a CertificateAuthority message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @returns {google.cloud.security.privateca.v1.CertificateAuthority} CertificateAuthority * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -464,7 +450,7 @@ /** * Verifies a CertificateAuthority message. * @function verify - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -484,17 +470,8 @@ case 2: break; } - if (message.tier != null && message.hasOwnProperty("tier")) - switch (message.tier) { - default: - return "tier: enum value expected"; - case 0: - case 1: - case 2: - break; - } if (message.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.verify(message.config); + var error = $root.google.cloud.security.privateca.v1.CertificateConfig.verify(message.config); if (error) return "config." + error; } @@ -504,25 +481,24 @@ return "lifetime." + error; } if (message.keySpec != null && message.hasOwnProperty("keySpec")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify(message.keySpec); + var error = $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.verify(message.keySpec); if (error) return "keySpec." + error; } - if (message.certificatePolicy != null && message.hasOwnProperty("certificatePolicy")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify(message.certificatePolicy); - if (error) - return "certificatePolicy." + error; - } - if (message.issuingOptions != null && message.hasOwnProperty("issuingOptions")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify(message.issuingOptions); - if (error) - return "issuingOptions." + error; - } if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) { - var error = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.verify(message.subordinateConfig); + var error = $root.google.cloud.security.privateca.v1.SubordinateConfig.verify(message.subordinateConfig); if (error) return "subordinateConfig." + error; } + if (message.tier != null && message.hasOwnProperty("tier")) + switch (message.tier) { + default: + return "tier: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -532,6 +508,7 @@ case 2: case 3: case 4: + case 5: break; } if (message.pemCaCertificates != null && message.hasOwnProperty("pemCaCertificates")) { @@ -545,7 +522,7 @@ if (!Array.isArray(message.caCertificateDescriptions)) return "caCertificateDescriptions: array expected"; for (var i = 0; i < message.caCertificateDescriptions.length; ++i) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.verify(message.caCertificateDescriptions[i]); + var error = $root.google.cloud.security.privateca.v1.CertificateDescription.verify(message.caCertificateDescriptions[i]); if (error) return "caCertificateDescriptions." + error; } @@ -554,7 +531,7 @@ if (!$util.isString(message.gcsBucket)) return "gcsBucket: string expected"; if (message.accessUrls != null && message.hasOwnProperty("accessUrls")) { - var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify(message.accessUrls); + var error = $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.verify(message.accessUrls); if (error) return "accessUrls." + error; } @@ -573,6 +550,11 @@ if (error) return "deleteTime." + error; } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } if (message.labels != null && message.hasOwnProperty("labels")) { if (!$util.isObject(message.labels)) return "labels: object expected"; @@ -587,15 +569,15 @@ /** * Creates a CertificateAuthority message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @returns {google.cloud.security.privateca.v1.CertificateAuthority} CertificateAuthority */ CertificateAuthority.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority) + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateAuthority) return object; - var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority(); + var message = new $root.google.cloud.security.privateca.v1.CertificateAuthority(); if (object.name != null) message.name = String(object.name); switch (object.type) { @@ -612,6 +594,26 @@ message.type = 2; break; } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.config: object expected"); + message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.fromObject(object.config); + } + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.keySpec != null) { + if (typeof object.keySpec !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.keySpec: object expected"); + message.keySpec = $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.fromObject(object.keySpec); + } + if (object.subordinateConfig != null) { + if (typeof object.subordinateConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.subordinateConfig: object expected"); + message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.fromObject(object.subordinateConfig); + } switch (object.tier) { case "TIER_UNSPECIFIED": case 0: @@ -626,36 +628,6 @@ message.tier = 2; break; } - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.config: object expected"); - message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.fromObject(object.config); - } - if (object.lifetime != null) { - if (typeof object.lifetime !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.lifetime: object expected"); - message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); - } - if (object.keySpec != null) { - if (typeof object.keySpec !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.keySpec: object expected"); - message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.fromObject(object.keySpec); - } - if (object.certificatePolicy != null) { - if (typeof object.certificatePolicy !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.certificatePolicy: object expected"); - message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.fromObject(object.certificatePolicy); - } - if (object.issuingOptions != null) { - if (typeof object.issuingOptions !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.issuingOptions: object expected"); - message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.fromObject(object.issuingOptions); - } - if (object.subordinateConfig != null) { - if (typeof object.subordinateConfig !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.subordinateConfig: object expected"); - message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.fromObject(object.subordinateConfig); - } switch (object.state) { case "STATE_UNSPECIFIED": case 0: @@ -669,57 +641,66 @@ case 2: message.state = 2; break; - case "PENDING_ACTIVATION": + case "STAGED": case 3: message.state = 3; break; - case "PENDING_DELETION": + case "AWAITING_USER_ACTIVATION": case 4: message.state = 4; break; + case "DELETED": + case 5: + message.state = 5; + break; } if (object.pemCaCertificates) { if (!Array.isArray(object.pemCaCertificates)) - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.pemCaCertificates: array expected"); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.pemCaCertificates: array expected"); message.pemCaCertificates = []; for (var i = 0; i < object.pemCaCertificates.length; ++i) message.pemCaCertificates[i] = String(object.pemCaCertificates[i]); } if (object.caCertificateDescriptions) { if (!Array.isArray(object.caCertificateDescriptions)) - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.caCertificateDescriptions: array expected"); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.caCertificateDescriptions: array expected"); message.caCertificateDescriptions = []; for (var i = 0; i < object.caCertificateDescriptions.length; ++i) { if (typeof object.caCertificateDescriptions[i] !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.caCertificateDescriptions: object expected"); - message.caCertificateDescriptions[i] = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.fromObject(object.caCertificateDescriptions[i]); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.caCertificateDescriptions: object expected"); + message.caCertificateDescriptions[i] = $root.google.cloud.security.privateca.v1.CertificateDescription.fromObject(object.caCertificateDescriptions[i]); } } if (object.gcsBucket != null) message.gcsBucket = String(object.gcsBucket); if (object.accessUrls != null) { if (typeof object.accessUrls !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.accessUrls: object expected"); - message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.fromObject(object.accessUrls); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.accessUrls: object expected"); + message.accessUrls = $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.fromObject(object.accessUrls); } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.createTime: object expected"); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.updateTime: object expected"); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } if (object.deleteTime != null) { if (typeof object.deleteTime !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.deleteTime: object expected"); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } if (object.labels) { if (typeof object.labels !== "object") - throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.labels: object expected"); + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.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]]); @@ -730,9 +711,9 @@ /** * Creates a plain object from a CertificateAuthority message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} message CertificateAuthority + * @param {google.cloud.security.privateca.v1.CertificateAuthority} message CertificateAuthority * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -749,73 +730,70 @@ if (options.defaults) { object.name = ""; object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; object.config = null; object.lifetime = null; object.keySpec = null; - object.certificatePolicy = null; - object.issuingOptions = null; + object.subordinateConfig = null; + object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.gcsBucket = ""; object.accessUrls = null; object.createTime = null; object.updateTime = null; object.deleteTime = null; - object.subordinateConfig = null; + object.expireTime = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type[message.type] : message.type; - if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier[message.tier] : message.tier; + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.Type[message.type] : message.type; if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.toObject(message.config, options); + object.config = $root.google.cloud.security.privateca.v1.CertificateConfig.toObject(message.config, options); if (message.lifetime != null && message.hasOwnProperty("lifetime")) object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); if (message.keySpec != null && message.hasOwnProperty("keySpec")) - object.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.toObject(message.keySpec, options); - if (message.certificatePolicy != null && message.hasOwnProperty("certificatePolicy")) - object.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.toObject(message.certificatePolicy, options); - if (message.issuingOptions != null && message.hasOwnProperty("issuingOptions")) - object.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.toObject(message.issuingOptions, options); + object.keySpec = $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.toObject(message.keySpec, options); + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) + object.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.toObject(message.subordinateConfig, options); + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] : message.tier; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.State[message.state] : message.state; if (message.pemCaCertificates && message.pemCaCertificates.length) { object.pemCaCertificates = []; for (var j = 0; j < message.pemCaCertificates.length; ++j) object.pemCaCertificates[j] = message.pemCaCertificates[j]; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.State[message.state] : message.state; if (message.caCertificateDescriptions && message.caCertificateDescriptions.length) { object.caCertificateDescriptions = []; for (var j = 0; j < message.caCertificateDescriptions.length; ++j) - object.caCertificateDescriptions[j] = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.toObject(message.caCertificateDescriptions[j], options); + object.caCertificateDescriptions[j] = $root.google.cloud.security.privateca.v1.CertificateDescription.toObject(message.caCertificateDescriptions[j], options); } if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) object.gcsBucket = message.gcsBucket; if (message.accessUrls != null && message.hasOwnProperty("accessUrls")) - object.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.toObject(message.accessUrls, options); + object.accessUrls = $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.toObject(message.accessUrls, options); if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, 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]]; } - if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) - object.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.toObject(message.subordinateConfig, options); return object; }; /** * Converts this CertificateAuthority to JSON. * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthority * @instance * @returns {Object.} JSON object */ @@ -823,25 +801,26 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - CertificateAuthority.IssuingOptions = (function() { + CertificateAuthority.AccessUrls = (function() { /** - * Properties of an IssuingOptions. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority - * @interface IIssuingOptions - * @property {boolean|null} [includeCaCertUrl] IssuingOptions includeCaCertUrl - * @property {boolean|null} [includeCrlAccessUrl] IssuingOptions includeCrlAccessUrl + * Properties of an AccessUrls. + * @memberof google.cloud.security.privateca.v1.CertificateAuthority + * @interface IAccessUrls + * @property {string|null} [caCertificateAccessUrl] AccessUrls caCertificateAccessUrl + * @property {Array.|null} [crlAccessUrls] AccessUrls crlAccessUrls */ /** - * Constructs a new IssuingOptions. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority - * @classdesc Represents an IssuingOptions. - * @implements IIssuingOptions + * Constructs a new AccessUrls. + * @memberof google.cloud.security.privateca.v1.CertificateAuthority + * @classdesc Represents an AccessUrls. + * @implements IAccessUrls * @constructor - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions=} [properties] Properties to set + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls=} [properties] Properties to set */ - function IssuingOptions(properties) { + function AccessUrls(properties) { + this.crlAccessUrls = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -849,88 +828,91 @@ } /** - * IssuingOptions includeCaCertUrl. - * @member {boolean} includeCaCertUrl - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * AccessUrls caCertificateAccessUrl. + * @member {string} caCertificateAccessUrl + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @instance */ - IssuingOptions.prototype.includeCaCertUrl = false; + AccessUrls.prototype.caCertificateAccessUrl = ""; /** - * IssuingOptions includeCrlAccessUrl. - * @member {boolean} includeCrlAccessUrl - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * AccessUrls crlAccessUrls. + * @member {Array.} crlAccessUrls + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @instance */ - IssuingOptions.prototype.includeCrlAccessUrl = false; + AccessUrls.prototype.crlAccessUrls = $util.emptyArray; /** - * Creates a new IssuingOptions instance using the specified properties. + * Creates a new AccessUrls instance using the specified properties. * @function create - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions instance + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls} AccessUrls instance */ - IssuingOptions.create = function create(properties) { - return new IssuingOptions(properties); + AccessUrls.create = function create(properties) { + return new AccessUrls(properties); }; /** - * Encodes the specified IssuingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * Encodes the specified AccessUrls message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.verify|verify} messages. * @function encode - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions} message IssuingOptions message or plain object to encode + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls} message AccessUrls message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssuingOptions.encode = function encode(message, writer) { + AccessUrls.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeCaCertUrl != null && Object.hasOwnProperty.call(message, "includeCaCertUrl")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeCaCertUrl); - if (message.includeCrlAccessUrl != null && Object.hasOwnProperty.call(message, "includeCrlAccessUrl")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeCrlAccessUrl); + if (message.caCertificateAccessUrl != null && Object.hasOwnProperty.call(message, "caCertificateAccessUrl")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caCertificateAccessUrl); + if (message.crlAccessUrls != null && message.crlAccessUrls.length) + for (var i = 0; i < message.crlAccessUrls.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.crlAccessUrls[i]); return writer; }; /** - * Encodes the specified IssuingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * Encodes the specified AccessUrls message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions} message IssuingOptions message or plain object to encode + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IAccessUrls} message AccessUrls message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IssuingOptions.encodeDelimited = function encodeDelimited(message, writer) { + AccessUrls.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an IssuingOptions message from the specified reader or buffer. + * Decodes an AccessUrls message from the specified reader or buffer. * @function decode - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls} AccessUrls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssuingOptions.decode = function decode(reader, length) { + AccessUrls.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.includeCaCertUrl = reader.bool(); + message.caCertificateAccessUrl = reader.string(); break; case 2: - message.includeCrlAccessUrl = reader.bool(); + if (!(message.crlAccessUrls && message.crlAccessUrls.length)) + message.crlAccessUrls = []; + message.crlAccessUrls.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -941,124 +923,129 @@ }; /** - * Decodes an IssuingOptions message from the specified reader or buffer, length delimited. + * Decodes an AccessUrls message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls} AccessUrls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IssuingOptions.decodeDelimited = function decodeDelimited(reader) { + AccessUrls.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an IssuingOptions message. + * Verifies an AccessUrls message. * @function verify - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - IssuingOptions.verify = function verify(message) { + AccessUrls.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.includeCaCertUrl != null && message.hasOwnProperty("includeCaCertUrl")) - if (typeof message.includeCaCertUrl !== "boolean") - return "includeCaCertUrl: boolean expected"; - if (message.includeCrlAccessUrl != null && message.hasOwnProperty("includeCrlAccessUrl")) - if (typeof message.includeCrlAccessUrl !== "boolean") - return "includeCrlAccessUrl: boolean expected"; + if (message.caCertificateAccessUrl != null && message.hasOwnProperty("caCertificateAccessUrl")) + if (!$util.isString(message.caCertificateAccessUrl)) + return "caCertificateAccessUrl: string expected"; + if (message.crlAccessUrls != null && message.hasOwnProperty("crlAccessUrls")) { + if (!Array.isArray(message.crlAccessUrls)) + return "crlAccessUrls: array expected"; + for (var i = 0; i < message.crlAccessUrls.length; ++i) + if (!$util.isString(message.crlAccessUrls[i])) + return "crlAccessUrls: string[] expected"; + } return null; }; /** - * Creates an IssuingOptions message from a plain object. Also converts values to their respective internal types. + * Creates an AccessUrls message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static * @param {Object.} object Plain object - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls} AccessUrls */ - IssuingOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + AccessUrls.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls) return object; - var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); - if (object.includeCaCertUrl != null) - message.includeCaCertUrl = Boolean(object.includeCaCertUrl); - if (object.includeCrlAccessUrl != null) - message.includeCrlAccessUrl = Boolean(object.includeCrlAccessUrl); + var message = new $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls(); + if (object.caCertificateAccessUrl != null) + message.caCertificateAccessUrl = String(object.caCertificateAccessUrl); + if (object.crlAccessUrls) { + if (!Array.isArray(object.crlAccessUrls)) + throw TypeError(".google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.crlAccessUrls: array expected"); + message.crlAccessUrls = []; + for (var i = 0; i < object.crlAccessUrls.length; ++i) + message.crlAccessUrls[i] = String(object.crlAccessUrls[i]); + } return message; }; /** - * Creates a plain object from an IssuingOptions message. Also converts values to other types if specified. + * Creates a plain object from an AccessUrls message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} message IssuingOptions + * @param {google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls} message AccessUrls * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - IssuingOptions.toObject = function toObject(message, options) { + AccessUrls.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.includeCaCertUrl = false; - object.includeCrlAccessUrl = false; + if (options.arrays || options.defaults) + object.crlAccessUrls = []; + if (options.defaults) + object.caCertificateAccessUrl = ""; + if (message.caCertificateAccessUrl != null && message.hasOwnProperty("caCertificateAccessUrl")) + object.caCertificateAccessUrl = message.caCertificateAccessUrl; + if (message.crlAccessUrls && message.crlAccessUrls.length) { + object.crlAccessUrls = []; + for (var j = 0; j < message.crlAccessUrls.length; ++j) + object.crlAccessUrls[j] = message.crlAccessUrls[j]; } - if (message.includeCaCertUrl != null && message.hasOwnProperty("includeCaCertUrl")) - object.includeCaCertUrl = message.includeCaCertUrl; - if (message.includeCrlAccessUrl != null && message.hasOwnProperty("includeCrlAccessUrl")) - object.includeCrlAccessUrl = message.includeCrlAccessUrl; return object; }; /** - * Converts this IssuingOptions to JSON. + * Converts this AccessUrls to JSON. * @function toJSON - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls * @instance * @returns {Object.} JSON object */ - IssuingOptions.prototype.toJSON = function toJSON() { + AccessUrls.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return IssuingOptions; + return AccessUrls; })(); - CertificateAuthority.CertificateAuthorityPolicy = (function() { + CertificateAuthority.KeyVersionSpec = (function() { /** - * Properties of a CertificateAuthorityPolicy. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority - * @interface ICertificateAuthorityPolicy - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null} [allowedConfigList] CertificateAuthorityPolicy allowedConfigList - * @property {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null} [overwriteConfigValues] CertificateAuthorityPolicy overwriteConfigValues - * @property {Array.|null} [allowedLocationsAndOrganizations] CertificateAuthorityPolicy allowedLocationsAndOrganizations - * @property {Array.|null} [allowedCommonNames] CertificateAuthorityPolicy allowedCommonNames - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null} [allowedSans] CertificateAuthorityPolicy allowedSans - * @property {google.protobuf.IDuration|null} [maximumLifetime] CertificateAuthorityPolicy maximumLifetime - * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null} [allowedIssuanceModes] CertificateAuthorityPolicy allowedIssuanceModes + * Properties of a KeyVersionSpec. + * @memberof google.cloud.security.privateca.v1.CertificateAuthority + * @interface IKeyVersionSpec + * @property {string|null} [cloudKmsKeyVersion] KeyVersionSpec cloudKmsKeyVersion + * @property {google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|null} [algorithm] KeyVersionSpec algorithm */ /** - * Constructs a new CertificateAuthorityPolicy. - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority - * @classdesc Represents a CertificateAuthorityPolicy. - * @implements ICertificateAuthorityPolicy + * Constructs a new KeyVersionSpec. + * @memberof google.cloud.security.privateca.v1.CertificateAuthority + * @classdesc Represents a KeyVersionSpec. + * @implements IKeyVersionSpec * @constructor - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy=} [properties] Properties to set + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec=} [properties] Properties to set */ - function CertificateAuthorityPolicy(properties) { - this.allowedLocationsAndOrganizations = []; - this.allowedCommonNames = []; + function KeyVersionSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1066,117 +1053,20718 @@ } /** - * CertificateAuthorityPolicy allowedConfigList. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null|undefined} allowedConfigList - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy - * @instance - */ - CertificateAuthorityPolicy.prototype.allowedConfigList = null; - - /** - * CertificateAuthorityPolicy overwriteConfigValues. - * @member {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null|undefined} overwriteConfigValues - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy - * @instance - */ - CertificateAuthorityPolicy.prototype.overwriteConfigValues = null; - - /** - * CertificateAuthorityPolicy allowedLocationsAndOrganizations. - * @member {Array.} allowedLocationsAndOrganizations - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy - * @instance - */ - CertificateAuthorityPolicy.prototype.allowedLocationsAndOrganizations = $util.emptyArray; - - /** - * CertificateAuthorityPolicy allowedCommonNames. - * @member {Array.} allowedCommonNames - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy - * @instance - */ - CertificateAuthorityPolicy.prototype.allowedCommonNames = $util.emptyArray; - - /** - * CertificateAuthorityPolicy allowedSans. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null|undefined} allowedSans - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy - * @instance - */ - CertificateAuthorityPolicy.prototype.allowedSans = null; - - /** - * CertificateAuthorityPolicy maximumLifetime. - * @member {google.protobuf.IDuration|null|undefined} maximumLifetime - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * KeyVersionSpec cloudKmsKeyVersion. + * @member {string} cloudKmsKeyVersion + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @instance */ - CertificateAuthorityPolicy.prototype.maximumLifetime = null; + KeyVersionSpec.prototype.cloudKmsKeyVersion = ""; /** - * CertificateAuthorityPolicy allowedIssuanceModes. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null|undefined} allowedIssuanceModes - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * KeyVersionSpec algorithm. + * @member {google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm} algorithm + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @instance */ - CertificateAuthorityPolicy.prototype.allowedIssuanceModes = null; + KeyVersionSpec.prototype.algorithm = 0; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * CertificateAuthorityPolicy configPolicy. - * @member {"allowedConfigList"|"overwriteConfigValues"|undefined} configPolicy - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * KeyVersionSpec KeyVersion. + * @member {"cloudKmsKeyVersion"|"algorithm"|undefined} KeyVersion + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @instance */ - Object.defineProperty(CertificateAuthorityPolicy.prototype, "configPolicy", { - get: $util.oneOfGetter($oneOfFields = ["allowedConfigList", "overwriteConfigValues"]), + Object.defineProperty(KeyVersionSpec.prototype, "KeyVersion", { + get: $util.oneOfGetter($oneOfFields = ["cloudKmsKeyVersion", "algorithm"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CertificateAuthorityPolicy instance using the specified properties. + * Creates a new KeyVersionSpec instance using the specified properties. * @function create - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy=} [properties] Properties to set - * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} CertificateAuthorityPolicy instance + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec instance */ - CertificateAuthorityPolicy.create = function create(properties) { - return new CertificateAuthorityPolicy(properties); + KeyVersionSpec.create = function create(properties) { + return new KeyVersionSpec(properties); }; /** - * Encodes the specified CertificateAuthorityPolicy message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * Encodes the specified KeyVersionSpec message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @static - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy} message CertificateAuthorityPolicy message or plain object to encode + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec} message KeyVersionSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CertificateAuthorityPolicy.encode = function encode(message, writer) { + KeyVersionSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.allowedConfigList != null && Object.hasOwnProperty.call(message, "allowedConfigList")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.encode(message.allowedConfigList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.overwriteConfigValues != null && Object.hasOwnProperty.call(message, "overwriteConfigValues")) - $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.encode(message.overwriteConfigValues, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.allowedLocationsAndOrganizations != null && message.allowedLocationsAndOrganizations.length) - for (var i = 0; i < message.allowedLocationsAndOrganizations.length; ++i) - $root.google.cloud.security.privateca.v1beta1.Subject.encode(message.allowedLocationsAndOrganizations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.allowedCommonNames != null && message.allowedCommonNames.length) - for (var i = 0; i < message.allowedCommonNames.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedCommonNames[i]); - if (message.allowedSans != null && Object.hasOwnProperty.call(message, "allowedSans")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.encode(message.allowedSans, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.maximumLifetime != null && Object.hasOwnProperty.call(message, "maximumLifetime")) - $root.google.protobuf.Duration.encode(message.maximumLifetime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.allowedIssuanceModes != null && Object.hasOwnProperty.call(message, "allowedIssuanceModes")) - $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.encode(message.allowedIssuanceModes, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - return writer; - }; + if (message.cloudKmsKeyVersion != null && Object.hasOwnProperty.call(message, "cloudKmsKeyVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.cloudKmsKeyVersion); + if (message.algorithm != null && Object.hasOwnProperty.call(message, "algorithm")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.algorithm); + return writer; + }; + + /** + * Encodes the specified KeyVersionSpec message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec} message KeyVersionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyVersionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyVersionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyVersionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.cloudKmsKeyVersion = reader.string(); + break; + case 2: + message.algorithm = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyVersionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyVersionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyVersionSpec message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyVersionSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.cloudKmsKeyVersion != null && message.hasOwnProperty("cloudKmsKeyVersion")) { + properties.KeyVersion = 1; + if (!$util.isString(message.cloudKmsKeyVersion)) + return "cloudKmsKeyVersion: string expected"; + } + if (message.algorithm != null && message.hasOwnProperty("algorithm")) { + if (properties.KeyVersion === 1) + return "KeyVersion: multiple values"; + properties.KeyVersion = 1; + switch (message.algorithm) { + default: + return "algorithm: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 6: + case 7: + case 8: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a KeyVersionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec} KeyVersionSpec + */ + KeyVersionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec(); + if (object.cloudKmsKeyVersion != null) + message.cloudKmsKeyVersion = String(object.cloudKmsKeyVersion); + switch (object.algorithm) { + case "SIGN_HASH_ALGORITHM_UNSPECIFIED": + case 0: + message.algorithm = 0; + break; + case "RSA_PSS_2048_SHA256": + case 1: + message.algorithm = 1; + break; + case "RSA_PSS_3072_SHA256": + case 2: + message.algorithm = 2; + break; + case "RSA_PSS_4096_SHA256": + case 3: + message.algorithm = 3; + break; + case "RSA_PKCS1_2048_SHA256": + case 6: + message.algorithm = 6; + break; + case "RSA_PKCS1_3072_SHA256": + case 7: + message.algorithm = 7; + break; + case "RSA_PKCS1_4096_SHA256": + case 8: + message.algorithm = 8; + break; + case "EC_P256_SHA256": + case 4: + message.algorithm = 4; + break; + case "EC_P384_SHA384": + case 5: + message.algorithm = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a KeyVersionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec} message KeyVersionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyVersionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudKmsKeyVersion != null && message.hasOwnProperty("cloudKmsKeyVersion")) { + object.cloudKmsKeyVersion = message.cloudKmsKeyVersion; + if (options.oneofs) + object.KeyVersion = "cloudKmsKeyVersion"; + } + if (message.algorithm != null && message.hasOwnProperty("algorithm")) { + object.algorithm = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm[message.algorithm] : message.algorithm; + if (options.oneofs) + object.KeyVersion = "algorithm"; + } + return object; + }; + + /** + * Converts this KeyVersionSpec to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @instance + * @returns {Object.} JSON object + */ + KeyVersionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyVersionSpec; + })(); + + /** + * Type enum. + * @name google.cloud.security.privateca.v1.CertificateAuthority.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SELF_SIGNED=1 SELF_SIGNED value + * @property {number} SUBORDINATE=2 SUBORDINATE value + */ + CertificateAuthority.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SELF_SIGNED"] = 1; + values[valuesById[2] = "SUBORDINATE"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.security.privateca.v1.CertificateAuthority.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} STAGED=3 STAGED value + * @property {number} AWAITING_USER_ACTIVATION=4 AWAITING_USER_ACTIVATION value + * @property {number} DELETED=5 DELETED value + */ + CertificateAuthority.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "STAGED"] = 3; + values[valuesById[4] = "AWAITING_USER_ACTIVATION"] = 4; + values[valuesById[5] = "DELETED"] = 5; + return values; + })(); + + /** + * SignHashAlgorithm enum. + * @name google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm + * @enum {number} + * @property {number} SIGN_HASH_ALGORITHM_UNSPECIFIED=0 SIGN_HASH_ALGORITHM_UNSPECIFIED value + * @property {number} RSA_PSS_2048_SHA256=1 RSA_PSS_2048_SHA256 value + * @property {number} RSA_PSS_3072_SHA256=2 RSA_PSS_3072_SHA256 value + * @property {number} RSA_PSS_4096_SHA256=3 RSA_PSS_4096_SHA256 value + * @property {number} RSA_PKCS1_2048_SHA256=6 RSA_PKCS1_2048_SHA256 value + * @property {number} RSA_PKCS1_3072_SHA256=7 RSA_PKCS1_3072_SHA256 value + * @property {number} RSA_PKCS1_4096_SHA256=8 RSA_PKCS1_4096_SHA256 value + * @property {number} EC_P256_SHA256=4 EC_P256_SHA256 value + * @property {number} EC_P384_SHA384=5 EC_P384_SHA384 value + */ + CertificateAuthority.SignHashAlgorithm = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGN_HASH_ALGORITHM_UNSPECIFIED"] = 0; + values[valuesById[1] = "RSA_PSS_2048_SHA256"] = 1; + values[valuesById[2] = "RSA_PSS_3072_SHA256"] = 2; + values[valuesById[3] = "RSA_PSS_4096_SHA256"] = 3; + values[valuesById[6] = "RSA_PKCS1_2048_SHA256"] = 6; + values[valuesById[7] = "RSA_PKCS1_3072_SHA256"] = 7; + values[valuesById[8] = "RSA_PKCS1_4096_SHA256"] = 8; + values[valuesById[4] = "EC_P256_SHA256"] = 4; + values[valuesById[5] = "EC_P384_SHA384"] = 5; + return values; + })(); + + return CertificateAuthority; + })(); + + v1.CaPool = (function() { + + /** + * Properties of a CaPool. + * @memberof google.cloud.security.privateca.v1 + * @interface ICaPool + * @property {string|null} [name] CaPool name + * @property {google.cloud.security.privateca.v1.CaPool.Tier|null} [tier] CaPool tier + * @property {google.cloud.security.privateca.v1.CaPool.IIssuancePolicy|null} [issuancePolicy] CaPool issuancePolicy + * @property {google.cloud.security.privateca.v1.CaPool.IPublishingOptions|null} [publishingOptions] CaPool publishingOptions + * @property {Object.|null} [labels] CaPool labels + */ + + /** + * Constructs a new CaPool. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CaPool. + * @implements ICaPool + * @constructor + * @param {google.cloud.security.privateca.v1.ICaPool=} [properties] Properties to set + */ + function CaPool(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CaPool name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.CaPool + * @instance + */ + CaPool.prototype.name = ""; + + /** + * CaPool tier. + * @member {google.cloud.security.privateca.v1.CaPool.Tier} tier + * @memberof google.cloud.security.privateca.v1.CaPool + * @instance + */ + CaPool.prototype.tier = 0; + + /** + * CaPool issuancePolicy. + * @member {google.cloud.security.privateca.v1.CaPool.IIssuancePolicy|null|undefined} issuancePolicy + * @memberof google.cloud.security.privateca.v1.CaPool + * @instance + */ + CaPool.prototype.issuancePolicy = null; + + /** + * CaPool publishingOptions. + * @member {google.cloud.security.privateca.v1.CaPool.IPublishingOptions|null|undefined} publishingOptions + * @memberof google.cloud.security.privateca.v1.CaPool + * @instance + */ + CaPool.prototype.publishingOptions = null; + + /** + * CaPool labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1.CaPool + * @instance + */ + CaPool.prototype.labels = $util.emptyObject; + + /** + * Creates a new CaPool instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {google.cloud.security.privateca.v1.ICaPool=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool} CaPool instance + */ + CaPool.create = function create(properties) { + return new CaPool(properties); + }; + + /** + * Encodes the specified CaPool message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {google.cloud.security.privateca.v1.ICaPool} message CaPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaPool.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.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.tier); + if (message.issuancePolicy != null && Object.hasOwnProperty.call(message, "issuancePolicy")) + $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.encode(message.issuancePolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.publishingOptions != null && Object.hasOwnProperty.call(message, "publishingOptions")) + $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.encode(message.publishingOptions, writer.uint32(/* id 4, wireType 2 =*/34).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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CaPool message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {google.cloud.security.privateca.v1.ICaPool} message CaPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaPool message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool} CaPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.tier = reader.int32(); + break; + case 3: + message.issuancePolicy = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.decode(reader, reader.uint32()); + break; + case 4: + message.publishingOptions = $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.decode(reader, reader.uint32()); + break; + case 5: + 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; + } + } + return message; + }; + + /** + * Decodes a CaPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool} CaPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaPool message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaPool.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.tier != null && message.hasOwnProperty("tier")) + switch (message.tier) { + default: + return "tier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.issuancePolicy != null && message.hasOwnProperty("issuancePolicy")) { + var error = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.verify(message.issuancePolicy); + if (error) + return "issuancePolicy." + error; + } + if (message.publishingOptions != null && message.hasOwnProperty("publishingOptions")) { + var error = $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.verify(message.publishingOptions); + if (error) + return "publishingOptions." + 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; + }; + + /** + * Creates a CaPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool} CaPool + */ + CaPool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool(); + if (object.name != null) + message.name = String(object.name); + switch (object.tier) { + case "TIER_UNSPECIFIED": + case 0: + message.tier = 0; + break; + case "ENTERPRISE": + case 1: + message.tier = 1; + break; + case "DEVOPS": + case 2: + message.tier = 2; + break; + } + if (object.issuancePolicy != null) { + if (typeof object.issuancePolicy !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.issuancePolicy: object expected"); + message.issuancePolicy = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.fromObject(object.issuancePolicy); + } + if (object.publishingOptions != null) { + if (typeof object.publishingOptions !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.publishingOptions: object expected"); + message.publishingOptions = $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.fromObject(object.publishingOptions); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.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; + }; + + /** + * Creates a plain object from a CaPool message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {google.cloud.security.privateca.v1.CaPool} message CaPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; + object.issuancePolicy = null; + object.publishingOptions = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] : message.tier; + if (message.issuancePolicy != null && message.hasOwnProperty("issuancePolicy")) + object.issuancePolicy = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.toObject(message.issuancePolicy, options); + if (message.publishingOptions != null && message.hasOwnProperty("publishingOptions")) + object.publishingOptions = $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.toObject(message.publishingOptions, 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; + }; + + /** + * Converts this CaPool to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool + * @instance + * @returns {Object.} JSON object + */ + CaPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CaPool.PublishingOptions = (function() { + + /** + * Properties of a PublishingOptions. + * @memberof google.cloud.security.privateca.v1.CaPool + * @interface IPublishingOptions + * @property {boolean|null} [publishCaCert] PublishingOptions publishCaCert + * @property {boolean|null} [publishCrl] PublishingOptions publishCrl + */ + + /** + * Constructs a new PublishingOptions. + * @memberof google.cloud.security.privateca.v1.CaPool + * @classdesc Represents a PublishingOptions. + * @implements IPublishingOptions + * @constructor + * @param {google.cloud.security.privateca.v1.CaPool.IPublishingOptions=} [properties] Properties to set + */ + function PublishingOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishingOptions publishCaCert. + * @member {boolean} publishCaCert + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @instance + */ + PublishingOptions.prototype.publishCaCert = false; + + /** + * PublishingOptions publishCrl. + * @member {boolean} publishCrl + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @instance + */ + PublishingOptions.prototype.publishCrl = false; + + /** + * Creates a new PublishingOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IPublishingOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool.PublishingOptions} PublishingOptions instance + */ + PublishingOptions.create = function create(properties) { + return new PublishingOptions(properties); + }; + + /** + * Encodes the specified PublishingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.PublishingOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IPublishingOptions} message PublishingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishingOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publishCaCert != null && Object.hasOwnProperty.call(message, "publishCaCert")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.publishCaCert); + if (message.publishCrl != null && Object.hasOwnProperty.call(message, "publishCrl")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.publishCrl); + return writer; + }; + + /** + * Encodes the specified PublishingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.PublishingOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IPublishingOptions} message PublishingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishingOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishingOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool.PublishingOptions} PublishingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishingOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publishCaCert = reader.bool(); + break; + case 2: + message.publishCrl = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublishingOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool.PublishingOptions} PublishingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishingOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishingOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishingOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publishCaCert != null && message.hasOwnProperty("publishCaCert")) + if (typeof message.publishCaCert !== "boolean") + return "publishCaCert: boolean expected"; + if (message.publishCrl != null && message.hasOwnProperty("publishCrl")) + if (typeof message.publishCrl !== "boolean") + return "publishCrl: boolean expected"; + return null; + }; + + /** + * Creates a PublishingOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool.PublishingOptions} PublishingOptions + */ + PublishingOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions(); + if (object.publishCaCert != null) + message.publishCaCert = Boolean(object.publishCaCert); + if (object.publishCrl != null) + message.publishCrl = Boolean(object.publishCrl); + return message; + }; + + /** + * Creates a plain object from a PublishingOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {google.cloud.security.privateca.v1.CaPool.PublishingOptions} message PublishingOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishingOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publishCaCert = false; + object.publishCrl = false; + } + if (message.publishCaCert != null && message.hasOwnProperty("publishCaCert")) + object.publishCaCert = message.publishCaCert; + if (message.publishCrl != null && message.hasOwnProperty("publishCrl")) + object.publishCrl = message.publishCrl; + return object; + }; + + /** + * Converts this PublishingOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @instance + * @returns {Object.} JSON object + */ + PublishingOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublishingOptions; + })(); + + CaPool.IssuancePolicy = (function() { + + /** + * Properties of an IssuancePolicy. + * @memberof google.cloud.security.privateca.v1.CaPool + * @interface IIssuancePolicy + * @property {Array.|null} [allowedKeyTypes] IssuancePolicy allowedKeyTypes + * @property {google.protobuf.IDuration|null} [maximumLifetime] IssuancePolicy maximumLifetime + * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes|null} [allowedIssuanceModes] IssuancePolicy allowedIssuanceModes + * @property {google.cloud.security.privateca.v1.IX509Parameters|null} [baselineValues] IssuancePolicy baselineValues + * @property {google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null} [identityConstraints] IssuancePolicy identityConstraints + * @property {google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null} [passthroughExtensions] IssuancePolicy passthroughExtensions + */ + + /** + * Constructs a new IssuancePolicy. + * @memberof google.cloud.security.privateca.v1.CaPool + * @classdesc Represents an IssuancePolicy. + * @implements IIssuancePolicy + * @constructor + * @param {google.cloud.security.privateca.v1.CaPool.IIssuancePolicy=} [properties] Properties to set + */ + function IssuancePolicy(properties) { + this.allowedKeyTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssuancePolicy allowedKeyTypes. + * @member {Array.} allowedKeyTypes + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + */ + IssuancePolicy.prototype.allowedKeyTypes = $util.emptyArray; + + /** + * IssuancePolicy maximumLifetime. + * @member {google.protobuf.IDuration|null|undefined} maximumLifetime + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + */ + IssuancePolicy.prototype.maximumLifetime = null; + + /** + * IssuancePolicy allowedIssuanceModes. + * @member {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes|null|undefined} allowedIssuanceModes + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + */ + IssuancePolicy.prototype.allowedIssuanceModes = null; + + /** + * IssuancePolicy baselineValues. + * @member {google.cloud.security.privateca.v1.IX509Parameters|null|undefined} baselineValues + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + */ + IssuancePolicy.prototype.baselineValues = null; + + /** + * IssuancePolicy identityConstraints. + * @member {google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null|undefined} identityConstraints + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + */ + IssuancePolicy.prototype.identityConstraints = null; + + /** + * IssuancePolicy passthroughExtensions. + * @member {google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null|undefined} passthroughExtensions + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + */ + IssuancePolicy.prototype.passthroughExtensions = null; + + /** + * Creates a new IssuancePolicy instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IIssuancePolicy=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy} IssuancePolicy instance + */ + IssuancePolicy.create = function create(properties) { + return new IssuancePolicy(properties); + }; + + /** + * Encodes the specified IssuancePolicy message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IIssuancePolicy} message IssuancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuancePolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedKeyTypes != null && message.allowedKeyTypes.length) + for (var i = 0; i < message.allowedKeyTypes.length; ++i) + $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.encode(message.allowedKeyTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maximumLifetime != null && Object.hasOwnProperty.call(message, "maximumLifetime")) + $root.google.protobuf.Duration.encode(message.maximumLifetime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedIssuanceModes != null && Object.hasOwnProperty.call(message, "allowedIssuanceModes")) + $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.encode(message.allowedIssuanceModes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.baselineValues != null && Object.hasOwnProperty.call(message, "baselineValues")) + $root.google.cloud.security.privateca.v1.X509Parameters.encode(message.baselineValues, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.identityConstraints != null && Object.hasOwnProperty.call(message, "identityConstraints")) + $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.encode(message.identityConstraints, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.passthroughExtensions != null && Object.hasOwnProperty.call(message, "passthroughExtensions")) + $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.encode(message.passthroughExtensions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IssuancePolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IIssuancePolicy} message IssuancePolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuancePolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssuancePolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy} IssuancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuancePolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.allowedKeyTypes && message.allowedKeyTypes.length)) + message.allowedKeyTypes = []; + message.allowedKeyTypes.push($root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.decode(reader, reader.uint32())); + break; + case 2: + message.maximumLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 3: + message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.decode(reader, reader.uint32()); + break; + case 4: + message.baselineValues = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + case 5: + message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.decode(reader, reader.uint32()); + break; + case 6: + message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssuancePolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy} IssuancePolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuancePolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssuancePolicy message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssuancePolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedKeyTypes != null && message.hasOwnProperty("allowedKeyTypes")) { + if (!Array.isArray(message.allowedKeyTypes)) + return "allowedKeyTypes: array expected"; + for (var i = 0; i < message.allowedKeyTypes.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.verify(message.allowedKeyTypes[i]); + if (error) + return "allowedKeyTypes." + error; + } + } + if (message.maximumLifetime != null && message.hasOwnProperty("maximumLifetime")) { + var error = $root.google.protobuf.Duration.verify(message.maximumLifetime); + if (error) + return "maximumLifetime." + error; + } + if (message.allowedIssuanceModes != null && message.hasOwnProperty("allowedIssuanceModes")) { + var error = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.verify(message.allowedIssuanceModes); + if (error) + return "allowedIssuanceModes." + error; + } + if (message.baselineValues != null && message.hasOwnProperty("baselineValues")) { + var error = $root.google.cloud.security.privateca.v1.X509Parameters.verify(message.baselineValues); + if (error) + return "baselineValues." + error; + } + if (message.identityConstraints != null && message.hasOwnProperty("identityConstraints")) { + var error = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.verify(message.identityConstraints); + if (error) + return "identityConstraints." + error; + } + if (message.passthroughExtensions != null && message.hasOwnProperty("passthroughExtensions")) { + var error = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.verify(message.passthroughExtensions); + if (error) + return "passthroughExtensions." + error; + } + return null; + }; + + /** + * Creates an IssuancePolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy} IssuancePolicy + */ + IssuancePolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy(); + if (object.allowedKeyTypes) { + if (!Array.isArray(object.allowedKeyTypes)) + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.allowedKeyTypes: array expected"); + message.allowedKeyTypes = []; + for (var i = 0; i < object.allowedKeyTypes.length; ++i) { + if (typeof object.allowedKeyTypes[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.allowedKeyTypes: object expected"); + message.allowedKeyTypes[i] = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.fromObject(object.allowedKeyTypes[i]); + } + } + if (object.maximumLifetime != null) { + if (typeof object.maximumLifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.maximumLifetime: object expected"); + message.maximumLifetime = $root.google.protobuf.Duration.fromObject(object.maximumLifetime); + } + if (object.allowedIssuanceModes != null) { + if (typeof object.allowedIssuanceModes !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.allowedIssuanceModes: object expected"); + message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.fromObject(object.allowedIssuanceModes); + } + if (object.baselineValues != null) { + if (typeof object.baselineValues !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baselineValues: object expected"); + message.baselineValues = $root.google.cloud.security.privateca.v1.X509Parameters.fromObject(object.baselineValues); + } + if (object.identityConstraints != null) { + if (typeof object.identityConstraints !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.identityConstraints: object expected"); + message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.fromObject(object.identityConstraints); + } + if (object.passthroughExtensions != null) { + if (typeof object.passthroughExtensions !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthroughExtensions: object expected"); + message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.fromObject(object.passthroughExtensions); + } + return message; + }; + + /** + * Creates a plain object from an IssuancePolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy} message IssuancePolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssuancePolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedKeyTypes = []; + if (options.defaults) { + object.maximumLifetime = null; + object.allowedIssuanceModes = null; + object.baselineValues = null; + object.identityConstraints = null; + object.passthroughExtensions = null; + } + if (message.allowedKeyTypes && message.allowedKeyTypes.length) { + object.allowedKeyTypes = []; + for (var j = 0; j < message.allowedKeyTypes.length; ++j) + object.allowedKeyTypes[j] = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.toObject(message.allowedKeyTypes[j], options); + } + if (message.maximumLifetime != null && message.hasOwnProperty("maximumLifetime")) + object.maximumLifetime = $root.google.protobuf.Duration.toObject(message.maximumLifetime, options); + if (message.allowedIssuanceModes != null && message.hasOwnProperty("allowedIssuanceModes")) + object.allowedIssuanceModes = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.toObject(message.allowedIssuanceModes, options); + if (message.baselineValues != null && message.hasOwnProperty("baselineValues")) + object.baselineValues = $root.google.cloud.security.privateca.v1.X509Parameters.toObject(message.baselineValues, options); + if (message.identityConstraints != null && message.hasOwnProperty("identityConstraints")) + object.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.toObject(message.identityConstraints, options); + if (message.passthroughExtensions != null && message.hasOwnProperty("passthroughExtensions")) + object.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.toObject(message.passthroughExtensions, options); + return object; + }; + + /** + * Converts this IssuancePolicy to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @instance + * @returns {Object.} JSON object + */ + IssuancePolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + IssuancePolicy.AllowedKeyType = (function() { + + /** + * Properties of an AllowedKeyType. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @interface IAllowedKeyType + * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null} [rsa] AllowedKeyType rsa + * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|null} [ellipticCurve] AllowedKeyType ellipticCurve + */ + + /** + * Constructs a new AllowedKeyType. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @classdesc Represents an AllowedKeyType. + * @implements IAllowedKeyType + * @constructor + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType=} [properties] Properties to set + */ + function AllowedKeyType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedKeyType rsa. + * @member {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null|undefined} rsa + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @instance + */ + AllowedKeyType.prototype.rsa = null; + + /** + * AllowedKeyType ellipticCurve. + * @member {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve} ellipticCurve + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @instance + */ + AllowedKeyType.prototype.ellipticCurve = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AllowedKeyType keyType. + * @member {"rsa"|"ellipticCurve"|undefined} keyType + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @instance + */ + Object.defineProperty(AllowedKeyType.prototype, "keyType", { + get: $util.oneOfGetter($oneOfFields = ["rsa", "ellipticCurve"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AllowedKeyType instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType} AllowedKeyType instance + */ + AllowedKeyType.create = function create(properties) { + return new AllowedKeyType(properties); + }; + + /** + * Encodes the specified AllowedKeyType message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType} message AllowedKeyType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedKeyType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rsa != null && Object.hasOwnProperty.call(message, "rsa")) + $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.encode(message.rsa, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ellipticCurve != null && Object.hasOwnProperty.call(message, "ellipticCurve")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ellipticCurve); + return writer; + }; + + /** + * Encodes the specified AllowedKeyType message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IAllowedKeyType} message AllowedKeyType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedKeyType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedKeyType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType} AllowedKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedKeyType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.decode(reader, reader.uint32()); + break; + case 2: + message.ellipticCurve = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedKeyType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType} AllowedKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedKeyType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedKeyType message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedKeyType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.rsa != null && message.hasOwnProperty("rsa")) { + properties.keyType = 1; + { + var error = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.verify(message.rsa); + if (error) + return "rsa." + error; + } + } + if (message.ellipticCurve != null && message.hasOwnProperty("ellipticCurve")) { + if (properties.keyType === 1) + return "keyType: multiple values"; + properties.keyType = 1; + switch (message.ellipticCurve) { + default: + return "ellipticCurve: enum value expected"; + case 0: + case 2: + case 3: + case 4: + break; + } + } + return null; + }; + + /** + * Creates an AllowedKeyType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType} AllowedKeyType + */ + AllowedKeyType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType(); + if (object.rsa != null) { + if (typeof object.rsa !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.rsa: object expected"); + message.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.fromObject(object.rsa); + } + switch (object.ellipticCurve) { + case "NAMED_CURVE_UNSPECIFIED": + case 0: + message.ellipticCurve = 0; + break; + case "ECDSA_P256": + case 2: + message.ellipticCurve = 2; + break; + case "ECDSA_P384": + case 3: + message.ellipticCurve = 3; + break; + case "EDDSA_25519": + case 4: + message.ellipticCurve = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an AllowedKeyType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType} message AllowedKeyType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedKeyType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.rsa != null && message.hasOwnProperty("rsa")) { + object.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.toObject(message.rsa, options); + if (options.oneofs) + object.keyType = "rsa"; + } + if (message.ellipticCurve != null && message.hasOwnProperty("ellipticCurve")) { + object.ellipticCurve = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve[message.ellipticCurve] : message.ellipticCurve; + if (options.oneofs) + object.keyType = "ellipticCurve"; + } + return object; + }; + + /** + * Converts this AllowedKeyType to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @instance + * @returns {Object.} JSON object + */ + AllowedKeyType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + AllowedKeyType.RsaKeyType = (function() { + + /** + * Properties of a RsaKeyType. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @interface IRsaKeyType + * @property {number|Long|null} [minModulusSize] RsaKeyType minModulusSize + * @property {number|Long|null} [maxModulusSize] RsaKeyType maxModulusSize + */ + + /** + * Constructs a new RsaKeyType. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @classdesc Represents a RsaKeyType. + * @implements IRsaKeyType + * @constructor + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType=} [properties] Properties to set + */ + function RsaKeyType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RsaKeyType minModulusSize. + * @member {number|Long} minModulusSize + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @instance + */ + RsaKeyType.prototype.minModulusSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RsaKeyType maxModulusSize. + * @member {number|Long} maxModulusSize + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @instance + */ + RsaKeyType.prototype.maxModulusSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RsaKeyType instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType} RsaKeyType instance + */ + RsaKeyType.create = function create(properties) { + return new RsaKeyType(properties); + }; + + /** + * Encodes the specified RsaKeyType message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType} message RsaKeyType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RsaKeyType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minModulusSize != null && Object.hasOwnProperty.call(message, "minModulusSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.minModulusSize); + if (message.maxModulusSize != null && Object.hasOwnProperty.call(message, "maxModulusSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxModulusSize); + return writer; + }; + + /** + * Encodes the specified RsaKeyType message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType} message RsaKeyType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RsaKeyType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RsaKeyType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType} RsaKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RsaKeyType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.minModulusSize = reader.int64(); + break; + case 2: + message.maxModulusSize = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RsaKeyType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType} RsaKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RsaKeyType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RsaKeyType message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RsaKeyType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minModulusSize != null && message.hasOwnProperty("minModulusSize")) + if (!$util.isInteger(message.minModulusSize) && !(message.minModulusSize && $util.isInteger(message.minModulusSize.low) && $util.isInteger(message.minModulusSize.high))) + return "minModulusSize: integer|Long expected"; + if (message.maxModulusSize != null && message.hasOwnProperty("maxModulusSize")) + if (!$util.isInteger(message.maxModulusSize) && !(message.maxModulusSize && $util.isInteger(message.maxModulusSize.low) && $util.isInteger(message.maxModulusSize.high))) + return "maxModulusSize: integer|Long expected"; + return null; + }; + + /** + * Creates a RsaKeyType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType} RsaKeyType + */ + RsaKeyType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType(); + if (object.minModulusSize != null) + if ($util.Long) + (message.minModulusSize = $util.Long.fromValue(object.minModulusSize)).unsigned = false; + else if (typeof object.minModulusSize === "string") + message.minModulusSize = parseInt(object.minModulusSize, 10); + else if (typeof object.minModulusSize === "number") + message.minModulusSize = object.minModulusSize; + else if (typeof object.minModulusSize === "object") + message.minModulusSize = new $util.LongBits(object.minModulusSize.low >>> 0, object.minModulusSize.high >>> 0).toNumber(); + if (object.maxModulusSize != null) + if ($util.Long) + (message.maxModulusSize = $util.Long.fromValue(object.maxModulusSize)).unsigned = false; + else if (typeof object.maxModulusSize === "string") + message.maxModulusSize = parseInt(object.maxModulusSize, 10); + else if (typeof object.maxModulusSize === "number") + message.maxModulusSize = object.maxModulusSize; + else if (typeof object.maxModulusSize === "object") + message.maxModulusSize = new $util.LongBits(object.maxModulusSize.low >>> 0, object.maxModulusSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RsaKeyType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType} message RsaKeyType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RsaKeyType.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.minModulusSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minModulusSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxModulusSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxModulusSize = options.longs === String ? "0" : 0; + } + if (message.minModulusSize != null && message.hasOwnProperty("minModulusSize")) + if (typeof message.minModulusSize === "number") + object.minModulusSize = options.longs === String ? String(message.minModulusSize) : message.minModulusSize; + else + object.minModulusSize = options.longs === String ? $util.Long.prototype.toString.call(message.minModulusSize) : options.longs === Number ? new $util.LongBits(message.minModulusSize.low >>> 0, message.minModulusSize.high >>> 0).toNumber() : message.minModulusSize; + if (message.maxModulusSize != null && message.hasOwnProperty("maxModulusSize")) + if (typeof message.maxModulusSize === "number") + object.maxModulusSize = options.longs === String ? String(message.maxModulusSize) : message.maxModulusSize; + else + object.maxModulusSize = options.longs === String ? $util.Long.prototype.toString.call(message.maxModulusSize) : options.longs === Number ? new $util.LongBits(message.maxModulusSize.low >>> 0, message.maxModulusSize.high >>> 0).toNumber() : message.maxModulusSize; + return object; + }; + + /** + * Converts this RsaKeyType to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @instance + * @returns {Object.} JSON object + */ + RsaKeyType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RsaKeyType; + })(); + + /** + * NamedCurve enum. + * @name google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve + * @enum {number} + * @property {number} NAMED_CURVE_UNSPECIFIED=0 NAMED_CURVE_UNSPECIFIED value + * @property {number} ECDSA_P256=2 ECDSA_P256 value + * @property {number} ECDSA_P384=3 ECDSA_P384 value + * @property {number} EDDSA_25519=4 EDDSA_25519 value + */ + AllowedKeyType.NamedCurve = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NAMED_CURVE_UNSPECIFIED"] = 0; + values[valuesById[2] = "ECDSA_P256"] = 2; + values[valuesById[3] = "ECDSA_P384"] = 3; + values[valuesById[4] = "EDDSA_25519"] = 4; + return values; + })(); + + return AllowedKeyType; + })(); + + IssuancePolicy.IssuanceModes = (function() { + + /** + * Properties of an IssuanceModes. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @interface IIssuanceModes + * @property {boolean|null} [allowCsrBasedIssuance] IssuanceModes allowCsrBasedIssuance + * @property {boolean|null} [allowConfigBasedIssuance] IssuanceModes allowConfigBasedIssuance + */ + + /** + * Constructs a new IssuanceModes. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @classdesc Represents an IssuanceModes. + * @implements IIssuanceModes + * @constructor + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes=} [properties] Properties to set + */ + function IssuanceModes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssuanceModes allowCsrBasedIssuance. + * @member {boolean} allowCsrBasedIssuance + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @instance + */ + IssuanceModes.prototype.allowCsrBasedIssuance = false; + + /** + * IssuanceModes allowConfigBasedIssuance. + * @member {boolean} allowConfigBasedIssuance + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @instance + */ + IssuanceModes.prototype.allowConfigBasedIssuance = false; + + /** + * Creates a new IssuanceModes instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes} IssuanceModes instance + */ + IssuanceModes.create = function create(properties) { + return new IssuanceModes(properties); + }; + + /** + * Encodes the specified IssuanceModes message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes} message IssuanceModes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuanceModes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowCsrBasedIssuance != null && Object.hasOwnProperty.call(message, "allowCsrBasedIssuance")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.allowCsrBasedIssuance); + if (message.allowConfigBasedIssuance != null && Object.hasOwnProperty.call(message, "allowConfigBasedIssuance")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowConfigBasedIssuance); + return writer; + }; + + /** + * Encodes the specified IssuanceModes message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IIssuanceModes} message IssuanceModes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuanceModes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes} IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuanceModes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.allowCsrBasedIssuance = reader.bool(); + break; + case 2: + message.allowConfigBasedIssuance = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssuanceModes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes} IssuanceModes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuanceModes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssuanceModes message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssuanceModes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowCsrBasedIssuance != null && message.hasOwnProperty("allowCsrBasedIssuance")) + if (typeof message.allowCsrBasedIssuance !== "boolean") + return "allowCsrBasedIssuance: boolean expected"; + if (message.allowConfigBasedIssuance != null && message.hasOwnProperty("allowConfigBasedIssuance")) + if (typeof message.allowConfigBasedIssuance !== "boolean") + return "allowConfigBasedIssuance: boolean expected"; + return null; + }; + + /** + * Creates an IssuanceModes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes} IssuanceModes + */ + IssuanceModes.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes(); + if (object.allowCsrBasedIssuance != null) + message.allowCsrBasedIssuance = Boolean(object.allowCsrBasedIssuance); + if (object.allowConfigBasedIssuance != null) + message.allowConfigBasedIssuance = Boolean(object.allowConfigBasedIssuance); + return message; + }; + + /** + * Creates a plain object from an IssuanceModes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes} message IssuanceModes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssuanceModes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.allowCsrBasedIssuance = false; + object.allowConfigBasedIssuance = false; + } + if (message.allowCsrBasedIssuance != null && message.hasOwnProperty("allowCsrBasedIssuance")) + object.allowCsrBasedIssuance = message.allowCsrBasedIssuance; + if (message.allowConfigBasedIssuance != null && message.hasOwnProperty("allowConfigBasedIssuance")) + object.allowConfigBasedIssuance = message.allowConfigBasedIssuance; + return object; + }; + + /** + * Converts this IssuanceModes to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @instance + * @returns {Object.} JSON object + */ + IssuanceModes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IssuanceModes; + })(); + + return IssuancePolicy; + })(); + + /** + * Tier enum. + * @name google.cloud.security.privateca.v1.CaPool.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} ENTERPRISE=1 ENTERPRISE value + * @property {number} DEVOPS=2 DEVOPS value + */ + CaPool.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTERPRISE"] = 1; + values[valuesById[2] = "DEVOPS"] = 2; + return values; + })(); + + return CaPool; + })(); + + v1.CertificateRevocationList = (function() { + + /** + * Properties of a CertificateRevocationList. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificateRevocationList + * @property {string|null} [name] CertificateRevocationList name + * @property {number|Long|null} [sequenceNumber] CertificateRevocationList sequenceNumber + * @property {Array.|null} [revokedCertificates] CertificateRevocationList revokedCertificates + * @property {string|null} [pemCrl] CertificateRevocationList pemCrl + * @property {string|null} [accessUrl] CertificateRevocationList accessUrl + * @property {google.cloud.security.privateca.v1.CertificateRevocationList.State|null} [state] CertificateRevocationList state + * @property {google.protobuf.ITimestamp|null} [createTime] CertificateRevocationList createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CertificateRevocationList updateTime + * @property {string|null} [revisionId] CertificateRevocationList revisionId + * @property {Object.|null} [labels] CertificateRevocationList labels + */ + + /** + * Constructs a new CertificateRevocationList. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateRevocationList. + * @implements ICertificateRevocationList + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificateRevocationList=} [properties] Properties to set + */ + function CertificateRevocationList(properties) { + this.revokedCertificates = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateRevocationList name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.name = ""; + + /** + * CertificateRevocationList sequenceNumber. + * @member {number|Long} sequenceNumber + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.sequenceNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CertificateRevocationList revokedCertificates. + * @member {Array.} revokedCertificates + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.revokedCertificates = $util.emptyArray; + + /** + * CertificateRevocationList pemCrl. + * @member {string} pemCrl + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.pemCrl = ""; + + /** + * CertificateRevocationList accessUrl. + * @member {string} accessUrl + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.accessUrl = ""; + + /** + * CertificateRevocationList state. + * @member {google.cloud.security.privateca.v1.CertificateRevocationList.State} state + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.state = 0; + + /** + * CertificateRevocationList createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.createTime = null; + + /** + * CertificateRevocationList updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.updateTime = null; + + /** + * CertificateRevocationList revisionId. + * @member {string} revisionId + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.revisionId = ""; + + /** + * CertificateRevocationList labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + */ + CertificateRevocationList.prototype.labels = $util.emptyObject; + + /** + * Creates a new CertificateRevocationList instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1.ICertificateRevocationList=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList} CertificateRevocationList instance + */ + CertificateRevocationList.create = function create(properties) { + return new CertificateRevocationList(properties); + }; + + /** + * Encodes the specified CertificateRevocationList message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1.ICertificateRevocationList} message CertificateRevocationList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateRevocationList.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.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sequenceNumber); + if (message.revokedCertificates != null && message.revokedCertificates.length) + for (var i = 0; i < message.revokedCertificates.length; ++i) + $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.encode(message.revokedCertificates[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.pemCrl != null && Object.hasOwnProperty.call(message, "pemCrl")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pemCrl); + if (message.accessUrl != null && Object.hasOwnProperty.call(message, "accessUrl")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.accessUrl); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.revisionId); + 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 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateRevocationList message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1.ICertificateRevocationList} message CertificateRevocationList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateRevocationList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList} CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateRevocationList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateRevocationList(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.sequenceNumber = reader.int64(); + break; + case 3: + if (!(message.revokedCertificates && message.revokedCertificates.length)) + message.revokedCertificates = []; + message.revokedCertificates.push($root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.decode(reader, reader.uint32())); + break; + case 4: + message.pemCrl = reader.string(); + break; + case 5: + message.accessUrl = reader.string(); + break; + case 6: + message.state = reader.int32(); + break; + case 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.revisionId = reader.string(); + break; + case 10: + 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; + } + } + return message; + }; + + /** + * Decodes a CertificateRevocationList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList} CertificateRevocationList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateRevocationList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateRevocationList message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateRevocationList.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.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (!$util.isInteger(message.sequenceNumber) && !(message.sequenceNumber && $util.isInteger(message.sequenceNumber.low) && $util.isInteger(message.sequenceNumber.high))) + return "sequenceNumber: integer|Long expected"; + if (message.revokedCertificates != null && message.hasOwnProperty("revokedCertificates")) { + if (!Array.isArray(message.revokedCertificates)) + return "revokedCertificates: array expected"; + for (var i = 0; i < message.revokedCertificates.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.verify(message.revokedCertificates[i]); + if (error) + return "revokedCertificates." + error; + } + } + if (message.pemCrl != null && message.hasOwnProperty("pemCrl")) + if (!$util.isString(message.pemCrl)) + return "pemCrl: string expected"; + if (message.accessUrl != null && message.hasOwnProperty("accessUrl")) + if (!$util.isString(message.accessUrl)) + return "accessUrl: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + if (!$util.isString(message.revisionId)) + return "revisionId: string 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"; + } + return null; + }; + + /** + * Creates a CertificateRevocationList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList} CertificateRevocationList + */ + CertificateRevocationList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateRevocationList) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateRevocationList(); + if (object.name != null) + message.name = String(object.name); + if (object.sequenceNumber != null) + if ($util.Long) + (message.sequenceNumber = $util.Long.fromValue(object.sequenceNumber)).unsigned = false; + else if (typeof object.sequenceNumber === "string") + message.sequenceNumber = parseInt(object.sequenceNumber, 10); + else if (typeof object.sequenceNumber === "number") + message.sequenceNumber = object.sequenceNumber; + else if (typeof object.sequenceNumber === "object") + message.sequenceNumber = new $util.LongBits(object.sequenceNumber.low >>> 0, object.sequenceNumber.high >>> 0).toNumber(); + if (object.revokedCertificates) { + if (!Array.isArray(object.revokedCertificates)) + throw TypeError(".google.cloud.security.privateca.v1.CertificateRevocationList.revokedCertificates: array expected"); + message.revokedCertificates = []; + for (var i = 0; i < object.revokedCertificates.length; ++i) { + if (typeof object.revokedCertificates[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateRevocationList.revokedCertificates: object expected"); + message.revokedCertificates[i] = $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.fromObject(object.revokedCertificates[i]); + } + } + if (object.pemCrl != null) + message.pemCrl = String(object.pemCrl); + if (object.accessUrl != null) + message.accessUrl = String(object.accessUrl); + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "SUPERSEDED": + case 2: + message.state = 2; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateRevocationList.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateRevocationList.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.revisionId != null) + message.revisionId = String(object.revisionId); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateRevocationList.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; + }; + + /** + * Creates a plain object from a CertificateRevocationList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {google.cloud.security.privateca.v1.CertificateRevocationList} message CertificateRevocationList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateRevocationList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.revokedCertificates = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sequenceNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequenceNumber = options.longs === String ? "0" : 0; + object.pemCrl = ""; + object.accessUrl = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.revisionId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sequenceNumber != null && message.hasOwnProperty("sequenceNumber")) + if (typeof message.sequenceNumber === "number") + object.sequenceNumber = options.longs === String ? String(message.sequenceNumber) : message.sequenceNumber; + else + object.sequenceNumber = options.longs === String ? $util.Long.prototype.toString.call(message.sequenceNumber) : options.longs === Number ? new $util.LongBits(message.sequenceNumber.low >>> 0, message.sequenceNumber.high >>> 0).toNumber() : message.sequenceNumber; + if (message.revokedCertificates && message.revokedCertificates.length) { + object.revokedCertificates = []; + for (var j = 0; j < message.revokedCertificates.length; ++j) + object.revokedCertificates[j] = $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.toObject(message.revokedCertificates[j], options); + } + if (message.pemCrl != null && message.hasOwnProperty("pemCrl")) + object.pemCrl = message.pemCrl; + if (message.accessUrl != null && message.hasOwnProperty("accessUrl")) + object.accessUrl = message.accessUrl; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateRevocationList.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.revisionId != null && message.hasOwnProperty("revisionId")) + object.revisionId = message.revisionId; + 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; + }; + + /** + * Converts this CertificateRevocationList to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @instance + * @returns {Object.} JSON object + */ + CertificateRevocationList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateRevocationList.RevokedCertificate = (function() { + + /** + * Properties of a RevokedCertificate. + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @interface IRevokedCertificate + * @property {string|null} [certificate] RevokedCertificate certificate + * @property {string|null} [hexSerialNumber] RevokedCertificate hexSerialNumber + * @property {google.cloud.security.privateca.v1.RevocationReason|null} [revocationReason] RevokedCertificate revocationReason + */ + + /** + * Constructs a new RevokedCertificate. + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @classdesc Represents a RevokedCertificate. + * @implements IRevokedCertificate + * @constructor + * @param {google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate=} [properties] Properties to set + */ + function RevokedCertificate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevokedCertificate certificate. + * @member {string} certificate + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @instance + */ + RevokedCertificate.prototype.certificate = ""; + + /** + * RevokedCertificate hexSerialNumber. + * @member {string} hexSerialNumber + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @instance + */ + RevokedCertificate.prototype.hexSerialNumber = ""; + + /** + * RevokedCertificate revocationReason. + * @member {google.cloud.security.privateca.v1.RevocationReason} revocationReason + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @instance + */ + RevokedCertificate.prototype.revocationReason = 0; + + /** + * Creates a new RevokedCertificate instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate} RevokedCertificate instance + */ + RevokedCertificate.create = function create(properties) { + return new RevokedCertificate(properties); + }; + + /** + * Encodes the specified RevokedCertificate message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate} message RevokedCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokedCertificate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.certificate); + if (message.hexSerialNumber != null && Object.hasOwnProperty.call(message, "hexSerialNumber")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.hexSerialNumber); + if (message.revocationReason != null && Object.hasOwnProperty.call(message, "revocationReason")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.revocationReason); + return writer; + }; + + /** + * Encodes the specified RevokedCertificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1.CertificateRevocationList.IRevokedCertificate} message RevokedCertificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokedCertificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate} RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokedCertificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificate = reader.string(); + break; + case 2: + message.hexSerialNumber = reader.string(); + break; + case 3: + message.revocationReason = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevokedCertificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate} RevokedCertificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokedCertificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevokedCertificate message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevokedCertificate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificate != null && message.hasOwnProperty("certificate")) + if (!$util.isString(message.certificate)) + return "certificate: string expected"; + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + if (!$util.isString(message.hexSerialNumber)) + return "hexSerialNumber: string expected"; + if (message.revocationReason != null && message.hasOwnProperty("revocationReason")) + switch (message.revocationReason) { + default: + return "revocationReason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + return null; + }; + + /** + * Creates a RevokedCertificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate} RevokedCertificate + */ + RevokedCertificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate(); + if (object.certificate != null) + message.certificate = String(object.certificate); + if (object.hexSerialNumber != null) + message.hexSerialNumber = String(object.hexSerialNumber); + switch (object.revocationReason) { + case "REVOCATION_REASON_UNSPECIFIED": + case 0: + message.revocationReason = 0; + break; + case "KEY_COMPROMISE": + case 1: + message.revocationReason = 1; + break; + case "CERTIFICATE_AUTHORITY_COMPROMISE": + case 2: + message.revocationReason = 2; + break; + case "AFFILIATION_CHANGED": + case 3: + message.revocationReason = 3; + break; + case "SUPERSEDED": + case 4: + message.revocationReason = 4; + break; + case "CESSATION_OF_OPERATION": + case 5: + message.revocationReason = 5; + break; + case "CERTIFICATE_HOLD": + case 6: + message.revocationReason = 6; + break; + case "PRIVILEGE_WITHDRAWN": + case 7: + message.revocationReason = 7; + break; + case "ATTRIBUTE_AUTHORITY_COMPROMISE": + case 8: + message.revocationReason = 8; + break; + } + return message; + }; + + /** + * Creates a plain object from a RevokedCertificate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate} message RevokedCertificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevokedCertificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificate = ""; + object.hexSerialNumber = ""; + object.revocationReason = options.enums === String ? "REVOCATION_REASON_UNSPECIFIED" : 0; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = message.certificate; + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + object.hexSerialNumber = message.hexSerialNumber; + if (message.revocationReason != null && message.hasOwnProperty("revocationReason")) + object.revocationReason = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationReason] : message.revocationReason; + return object; + }; + + /** + * Converts this RevokedCertificate to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @instance + * @returns {Object.} JSON object + */ + RevokedCertificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RevokedCertificate; + })(); + + /** + * State enum. + * @name google.cloud.security.privateca.v1.CertificateRevocationList.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} SUPERSEDED=2 SUPERSEDED value + */ + CertificateRevocationList.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "SUPERSEDED"] = 2; + return values; + })(); + + return CertificateRevocationList; + })(); + + v1.Certificate = (function() { + + /** + * Properties of a Certificate. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificate + * @property {string|null} [name] Certificate name + * @property {string|null} [pemCsr] Certificate pemCsr + * @property {google.cloud.security.privateca.v1.ICertificateConfig|null} [config] Certificate config + * @property {string|null} [issuerCertificateAuthority] Certificate issuerCertificateAuthority + * @property {google.protobuf.IDuration|null} [lifetime] Certificate lifetime + * @property {string|null} [certificateTemplate] Certificate certificateTemplate + * @property {google.cloud.security.privateca.v1.SubjectRequestMode|null} [subjectMode] Certificate subjectMode + * @property {google.cloud.security.privateca.v1.Certificate.IRevocationDetails|null} [revocationDetails] Certificate revocationDetails + * @property {string|null} [pemCertificate] Certificate pemCertificate + * @property {google.cloud.security.privateca.v1.ICertificateDescription|null} [certificateDescription] Certificate certificateDescription + * @property {Array.|null} [pemCertificateChain] Certificate pemCertificateChain + * @property {google.protobuf.ITimestamp|null} [createTime] Certificate createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Certificate updateTime + * @property {Object.|null} [labels] Certificate labels + */ + + /** + * Constructs a new Certificate. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a Certificate. + * @implements ICertificate + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificate=} [properties] Properties to set + */ + function Certificate(properties) { + this.pemCertificateChain = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Certificate name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.name = ""; + + /** + * Certificate pemCsr. + * @member {string} pemCsr + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.pemCsr = ""; + + /** + * Certificate config. + * @member {google.cloud.security.privateca.v1.ICertificateConfig|null|undefined} config + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.config = null; + + /** + * Certificate issuerCertificateAuthority. + * @member {string} issuerCertificateAuthority + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.issuerCertificateAuthority = ""; + + /** + * Certificate lifetime. + * @member {google.protobuf.IDuration|null|undefined} lifetime + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.lifetime = null; + + /** + * Certificate certificateTemplate. + * @member {string} certificateTemplate + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.certificateTemplate = ""; + + /** + * Certificate subjectMode. + * @member {google.cloud.security.privateca.v1.SubjectRequestMode} subjectMode + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.subjectMode = 0; + + /** + * Certificate revocationDetails. + * @member {google.cloud.security.privateca.v1.Certificate.IRevocationDetails|null|undefined} revocationDetails + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.revocationDetails = null; + + /** + * Certificate pemCertificate. + * @member {string} pemCertificate + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.pemCertificate = ""; + + /** + * Certificate certificateDescription. + * @member {google.cloud.security.privateca.v1.ICertificateDescription|null|undefined} certificateDescription + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.certificateDescription = null; + + /** + * Certificate pemCertificateChain. + * @member {Array.} pemCertificateChain + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.pemCertificateChain = $util.emptyArray; + + /** + * Certificate createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.createTime = null; + + /** + * Certificate updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.updateTime = null; + + /** + * Certificate labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Certificate.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Certificate certificateConfig. + * @member {"pemCsr"|"config"|undefined} certificateConfig + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + */ + Object.defineProperty(Certificate.prototype, "certificateConfig", { + get: $util.oneOfGetter($oneOfFields = ["pemCsr", "config"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Certificate instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {google.cloud.security.privateca.v1.ICertificate=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.Certificate} Certificate instance + */ + Certificate.create = function create(properties) { + return new Certificate(properties); + }; + + /** + * Encodes the specified Certificate message. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {google.cloud.security.privateca.v1.ICertificate} message Certificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Certificate.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.pemCsr != null && Object.hasOwnProperty.call(message, "pemCsr")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pemCsr); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.security.privateca.v1.CertificateConfig.encode(message.config, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.issuerCertificateAuthority != null && Object.hasOwnProperty.call(message, "issuerCertificateAuthority")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.issuerCertificateAuthority); + if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.certificateTemplate != null && Object.hasOwnProperty.call(message, "certificateTemplate")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.certificateTemplate); + if (message.subjectMode != null && Object.hasOwnProperty.call(message, "subjectMode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.subjectMode); + if (message.revocationDetails != null && Object.hasOwnProperty.call(message, "revocationDetails")) + $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.encode(message.revocationDetails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.pemCertificate != null && Object.hasOwnProperty.call(message, "pemCertificate")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pemCertificate); + if (message.certificateDescription != null && Object.hasOwnProperty.call(message, "certificateDescription")) + $root.google.cloud.security.privateca.v1.CertificateDescription.encode(message.certificateDescription, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.pemCertificateChain != null && message.pemCertificateChain.length) + for (var i = 0; i < message.pemCertificateChain.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.pemCertificateChain[i]); + 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.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 13, wireType 2 =*/106).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 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Certificate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {google.cloud.security.privateca.v1.ICertificate} message Certificate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Certificate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Certificate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.Certificate} Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Certificate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.Certificate(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pemCsr = reader.string(); + break; + case 3: + message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.decode(reader, reader.uint32()); + break; + case 4: + message.issuerCertificateAuthority = reader.string(); + break; + case 5: + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.certificateTemplate = reader.string(); + break; + case 7: + message.subjectMode = reader.int32(); + break; + case 8: + message.revocationDetails = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.decode(reader, reader.uint32()); + break; + case 9: + message.pemCertificate = reader.string(); + break; + case 10: + message.certificateDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.decode(reader, reader.uint32()); + break; + case 11: + if (!(message.pemCertificateChain && message.pemCertificateChain.length)) + message.pemCertificateChain = []; + message.pemCertificateChain.push(reader.string()); + break; + case 12: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 13: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 14: + 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; + } + } + return message; + }; + + /** + * Decodes a Certificate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.Certificate} Certificate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Certificate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Certificate message. + * @function verify + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Certificate.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.pemCsr != null && message.hasOwnProperty("pemCsr")) { + properties.certificateConfig = 1; + if (!$util.isString(message.pemCsr)) + return "pemCsr: string expected"; + } + if (message.config != null && message.hasOwnProperty("config")) { + if (properties.certificateConfig === 1) + return "certificateConfig: multiple values"; + properties.certificateConfig = 1; + { + var error = $root.google.cloud.security.privateca.v1.CertificateConfig.verify(message.config); + if (error) + return "config." + error; + } + } + if (message.issuerCertificateAuthority != null && message.hasOwnProperty("issuerCertificateAuthority")) + if (!$util.isString(message.issuerCertificateAuthority)) + return "issuerCertificateAuthority: string expected"; + if (message.lifetime != null && message.hasOwnProperty("lifetime")) { + var error = $root.google.protobuf.Duration.verify(message.lifetime); + if (error) + return "lifetime." + error; + } + if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) + if (!$util.isString(message.certificateTemplate)) + return "certificateTemplate: string expected"; + if (message.subjectMode != null && message.hasOwnProperty("subjectMode")) + switch (message.subjectMode) { + default: + return "subjectMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.revocationDetails != null && message.hasOwnProperty("revocationDetails")) { + var error = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.verify(message.revocationDetails); + if (error) + return "revocationDetails." + error; + } + if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) + if (!$util.isString(message.pemCertificate)) + return "pemCertificate: string expected"; + if (message.certificateDescription != null && message.hasOwnProperty("certificateDescription")) { + var error = $root.google.cloud.security.privateca.v1.CertificateDescription.verify(message.certificateDescription); + if (error) + return "certificateDescription." + error; + } + if (message.pemCertificateChain != null && message.hasOwnProperty("pemCertificateChain")) { + if (!Array.isArray(message.pemCertificateChain)) + return "pemCertificateChain: array expected"; + for (var i = 0; i < message.pemCertificateChain.length; ++i) + if (!$util.isString(message.pemCertificateChain[i])) + return "pemCertificateChain: string[] expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + 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; + }; + + /** + * Creates a Certificate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.Certificate} Certificate + */ + Certificate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.Certificate) + return object; + var message = new $root.google.cloud.security.privateca.v1.Certificate(); + if (object.name != null) + message.name = String(object.name); + if (object.pemCsr != null) + message.pemCsr = String(object.pemCsr); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.config: object expected"); + message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.fromObject(object.config); + } + if (object.issuerCertificateAuthority != null) + message.issuerCertificateAuthority = String(object.issuerCertificateAuthority); + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.certificateTemplate != null) + message.certificateTemplate = String(object.certificateTemplate); + switch (object.subjectMode) { + case "SUBJECT_REQUEST_MODE_UNSPECIFIED": + case 0: + message.subjectMode = 0; + break; + case "DEFAULT": + case 1: + message.subjectMode = 1; + break; + case "REFLECTED_SPIFFE": + case 2: + message.subjectMode = 2; + break; + } + if (object.revocationDetails != null) { + if (typeof object.revocationDetails !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.revocationDetails: object expected"); + message.revocationDetails = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.fromObject(object.revocationDetails); + } + if (object.pemCertificate != null) + message.pemCertificate = String(object.pemCertificate); + if (object.certificateDescription != null) { + if (typeof object.certificateDescription !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.certificateDescription: object expected"); + message.certificateDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.fromObject(object.certificateDescription); + } + if (object.pemCertificateChain) { + if (!Array.isArray(object.pemCertificateChain)) + throw TypeError(".google.cloud.security.privateca.v1.Certificate.pemCertificateChain: array expected"); + message.pemCertificateChain = []; + for (var i = 0; i < object.pemCertificateChain.length; ++i) + message.pemCertificateChain[i] = String(object.pemCertificateChain[i]); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.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; + }; + + /** + * Creates a plain object from a Certificate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {google.cloud.security.privateca.v1.Certificate} message Certificate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Certificate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pemCertificateChain = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.issuerCertificateAuthority = ""; + object.lifetime = null; + object.certificateTemplate = ""; + object.subjectMode = options.enums === String ? "SUBJECT_REQUEST_MODE_UNSPECIFIED" : 0; + object.revocationDetails = null; + object.pemCertificate = ""; + object.certificateDescription = null; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pemCsr != null && message.hasOwnProperty("pemCsr")) { + object.pemCsr = message.pemCsr; + if (options.oneofs) + object.certificateConfig = "pemCsr"; + } + if (message.config != null && message.hasOwnProperty("config")) { + object.config = $root.google.cloud.security.privateca.v1.CertificateConfig.toObject(message.config, options); + if (options.oneofs) + object.certificateConfig = "config"; + } + if (message.issuerCertificateAuthority != null && message.hasOwnProperty("issuerCertificateAuthority")) + object.issuerCertificateAuthority = message.issuerCertificateAuthority; + if (message.lifetime != null && message.hasOwnProperty("lifetime")) + object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); + if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) + object.certificateTemplate = message.certificateTemplate; + if (message.subjectMode != null && message.hasOwnProperty("subjectMode")) + object.subjectMode = options.enums === String ? $root.google.cloud.security.privateca.v1.SubjectRequestMode[message.subjectMode] : message.subjectMode; + if (message.revocationDetails != null && message.hasOwnProperty("revocationDetails")) + object.revocationDetails = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.toObject(message.revocationDetails, options); + if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) + object.pemCertificate = message.pemCertificate; + if (message.certificateDescription != null && message.hasOwnProperty("certificateDescription")) + object.certificateDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.toObject(message.certificateDescription, options); + if (message.pemCertificateChain && message.pemCertificateChain.length) { + object.pemCertificateChain = []; + for (var j = 0; j < message.pemCertificateChain.length; ++j) + object.pemCertificateChain[j] = message.pemCertificateChain[j]; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, 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; + }; + + /** + * Converts this Certificate to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.Certificate + * @instance + * @returns {Object.} JSON object + */ + Certificate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Certificate.RevocationDetails = (function() { + + /** + * Properties of a RevocationDetails. + * @memberof google.cloud.security.privateca.v1.Certificate + * @interface IRevocationDetails + * @property {google.cloud.security.privateca.v1.RevocationReason|null} [revocationState] RevocationDetails revocationState + * @property {google.protobuf.ITimestamp|null} [revocationTime] RevocationDetails revocationTime + */ + + /** + * Constructs a new RevocationDetails. + * @memberof google.cloud.security.privateca.v1.Certificate + * @classdesc Represents a RevocationDetails. + * @implements IRevocationDetails + * @constructor + * @param {google.cloud.security.privateca.v1.Certificate.IRevocationDetails=} [properties] Properties to set + */ + function RevocationDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevocationDetails revocationState. + * @member {google.cloud.security.privateca.v1.RevocationReason} revocationState + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @instance + */ + RevocationDetails.prototype.revocationState = 0; + + /** + * RevocationDetails revocationTime. + * @member {google.protobuf.ITimestamp|null|undefined} revocationTime + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @instance + */ + RevocationDetails.prototype.revocationTime = null; + + /** + * Creates a new RevocationDetails instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1.Certificate.IRevocationDetails=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.Certificate.RevocationDetails} RevocationDetails instance + */ + RevocationDetails.create = function create(properties) { + return new RevocationDetails(properties); + }; + + /** + * Encodes the specified RevocationDetails message. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.RevocationDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1.Certificate.IRevocationDetails} message RevocationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevocationDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.revocationState != null && Object.hasOwnProperty.call(message, "revocationState")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.revocationState); + if (message.revocationTime != null && Object.hasOwnProperty.call(message, "revocationTime")) + $root.google.protobuf.Timestamp.encode(message.revocationTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RevocationDetails message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.Certificate.RevocationDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1.Certificate.IRevocationDetails} message RevocationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevocationDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.Certificate.RevocationDetails} RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevocationDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.revocationState = reader.int32(); + break; + case 2: + message.revocationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevocationDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.Certificate.RevocationDetails} RevocationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevocationDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevocationDetails message. + * @function verify + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevocationDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.revocationState != null && message.hasOwnProperty("revocationState")) + switch (message.revocationState) { + default: + return "revocationState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.revocationTime != null && message.hasOwnProperty("revocationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.revocationTime); + if (error) + return "revocationTime." + error; + } + return null; + }; + + /** + * Creates a RevocationDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.Certificate.RevocationDetails} RevocationDetails + */ + RevocationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails) + return object; + var message = new $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails(); + switch (object.revocationState) { + case "REVOCATION_REASON_UNSPECIFIED": + case 0: + message.revocationState = 0; + break; + case "KEY_COMPROMISE": + case 1: + message.revocationState = 1; + break; + case "CERTIFICATE_AUTHORITY_COMPROMISE": + case 2: + message.revocationState = 2; + break; + case "AFFILIATION_CHANGED": + case 3: + message.revocationState = 3; + break; + case "SUPERSEDED": + case 4: + message.revocationState = 4; + break; + case "CESSATION_OF_OPERATION": + case 5: + message.revocationState = 5; + break; + case "CERTIFICATE_HOLD": + case 6: + message.revocationState = 6; + break; + case "PRIVILEGE_WITHDRAWN": + case 7: + message.revocationState = 7; + break; + case "ATTRIBUTE_AUTHORITY_COMPROMISE": + case 8: + message.revocationState = 8; + break; + } + if (object.revocationTime != null) { + if (typeof object.revocationTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.Certificate.RevocationDetails.revocationTime: object expected"); + message.revocationTime = $root.google.protobuf.Timestamp.fromObject(object.revocationTime); + } + return message; + }; + + /** + * Creates a plain object from a RevocationDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {google.cloud.security.privateca.v1.Certificate.RevocationDetails} message RevocationDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevocationDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.revocationState = options.enums === String ? "REVOCATION_REASON_UNSPECIFIED" : 0; + object.revocationTime = null; + } + if (message.revocationState != null && message.hasOwnProperty("revocationState")) + object.revocationState = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationState] : message.revocationState; + if (message.revocationTime != null && message.hasOwnProperty("revocationTime")) + object.revocationTime = $root.google.protobuf.Timestamp.toObject(message.revocationTime, options); + return object; + }; + + /** + * Converts this RevocationDetails to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @instance + * @returns {Object.} JSON object + */ + RevocationDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RevocationDetails; + })(); + + return Certificate; + })(); + + v1.CertificateTemplate = (function() { + + /** + * Properties of a CertificateTemplate. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificateTemplate + * @property {string|null} [name] CertificateTemplate name + * @property {google.cloud.security.privateca.v1.IX509Parameters|null} [predefinedValues] CertificateTemplate predefinedValues + * @property {google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null} [identityConstraints] CertificateTemplate identityConstraints + * @property {google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null} [passthroughExtensions] CertificateTemplate passthroughExtensions + * @property {string|null} [description] CertificateTemplate description + * @property {google.protobuf.ITimestamp|null} [createTime] CertificateTemplate createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CertificateTemplate updateTime + * @property {Object.|null} [labels] CertificateTemplate labels + */ + + /** + * Constructs a new CertificateTemplate. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateTemplate. + * @implements ICertificateTemplate + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificateTemplate=} [properties] Properties to set + */ + function CertificateTemplate(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateTemplate name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.name = ""; + + /** + * CertificateTemplate predefinedValues. + * @member {google.cloud.security.privateca.v1.IX509Parameters|null|undefined} predefinedValues + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.predefinedValues = null; + + /** + * CertificateTemplate identityConstraints. + * @member {google.cloud.security.privateca.v1.ICertificateIdentityConstraints|null|undefined} identityConstraints + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.identityConstraints = null; + + /** + * CertificateTemplate passthroughExtensions. + * @member {google.cloud.security.privateca.v1.ICertificateExtensionConstraints|null|undefined} passthroughExtensions + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.passthroughExtensions = null; + + /** + * CertificateTemplate description. + * @member {string} description + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.description = ""; + + /** + * CertificateTemplate createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.createTime = null; + + /** + * CertificateTemplate updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.updateTime = null; + + /** + * CertificateTemplate labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + */ + CertificateTemplate.prototype.labels = $util.emptyObject; + + /** + * Creates a new CertificateTemplate instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {google.cloud.security.privateca.v1.ICertificateTemplate=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateTemplate} CertificateTemplate instance + */ + CertificateTemplate.create = function create(properties) { + return new CertificateTemplate(properties); + }; + + /** + * Encodes the specified CertificateTemplate message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateTemplate.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {google.cloud.security.privateca.v1.ICertificateTemplate} message CertificateTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateTemplate.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.predefinedValues != null && Object.hasOwnProperty.call(message, "predefinedValues")) + $root.google.cloud.security.privateca.v1.X509Parameters.encode(message.predefinedValues, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identityConstraints != null && Object.hasOwnProperty.call(message, "identityConstraints")) + $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.encode(message.identityConstraints, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.passthroughExtensions != null && Object.hasOwnProperty.call(message, "passthroughExtensions")) + $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.encode(message.passthroughExtensions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).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 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateTemplate message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {google.cloud.security.privateca.v1.ICertificateTemplate} message CertificateTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateTemplate} CertificateTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateTemplate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateTemplate(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.predefinedValues = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + case 3: + message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.decode(reader, reader.uint32()); + break; + case 4: + message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.decode(reader, reader.uint32()); + break; + case 5: + message.description = reader.string(); + break; + case 6: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 8: + 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; + } + } + return message; + }; + + /** + * Decodes a CertificateTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateTemplate} CertificateTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateTemplate message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateTemplate.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.predefinedValues != null && message.hasOwnProperty("predefinedValues")) { + var error = $root.google.cloud.security.privateca.v1.X509Parameters.verify(message.predefinedValues); + if (error) + return "predefinedValues." + error; + } + if (message.identityConstraints != null && message.hasOwnProperty("identityConstraints")) { + var error = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.verify(message.identityConstraints); + if (error) + return "identityConstraints." + error; + } + if (message.passthroughExtensions != null && message.hasOwnProperty("passthroughExtensions")) { + var error = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.verify(message.passthroughExtensions); + if (error) + return "passthroughExtensions." + error; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + 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; + }; + + /** + * Creates a CertificateTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateTemplate} CertificateTemplate + */ + CertificateTemplate.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateTemplate) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateTemplate(); + if (object.name != null) + message.name = String(object.name); + if (object.predefinedValues != null) { + if (typeof object.predefinedValues !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateTemplate.predefinedValues: object expected"); + message.predefinedValues = $root.google.cloud.security.privateca.v1.X509Parameters.fromObject(object.predefinedValues); + } + if (object.identityConstraints != null) { + if (typeof object.identityConstraints !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateTemplate.identityConstraints: object expected"); + message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.fromObject(object.identityConstraints); + } + if (object.passthroughExtensions != null) { + if (typeof object.passthroughExtensions !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateTemplate.passthroughExtensions: object expected"); + message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.fromObject(object.passthroughExtensions); + } + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateTemplate.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateTemplate.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateTemplate.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; + }; + + /** + * Creates a plain object from a CertificateTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {google.cloud.security.privateca.v1.CertificateTemplate} message CertificateTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.predefinedValues = null; + object.identityConstraints = null; + object.passthroughExtensions = null; + object.description = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.predefinedValues != null && message.hasOwnProperty("predefinedValues")) + object.predefinedValues = $root.google.cloud.security.privateca.v1.X509Parameters.toObject(message.predefinedValues, options); + if (message.identityConstraints != null && message.hasOwnProperty("identityConstraints")) + object.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.toObject(message.identityConstraints, options); + if (message.passthroughExtensions != null && message.hasOwnProperty("passthroughExtensions")) + object.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.toObject(message.passthroughExtensions, options); + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, 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; + }; + + /** + * Converts this CertificateTemplate to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @instance + * @returns {Object.} JSON object + */ + CertificateTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertificateTemplate; + })(); + + v1.X509Parameters = (function() { + + /** + * Properties of a X509Parameters. + * @memberof google.cloud.security.privateca.v1 + * @interface IX509Parameters + * @property {google.cloud.security.privateca.v1.IKeyUsage|null} [keyUsage] X509Parameters keyUsage + * @property {google.cloud.security.privateca.v1.X509Parameters.ICaOptions|null} [caOptions] X509Parameters caOptions + * @property {Array.|null} [policyIds] X509Parameters policyIds + * @property {Array.|null} [aiaOcspServers] X509Parameters aiaOcspServers + * @property {Array.|null} [additionalExtensions] X509Parameters additionalExtensions + */ + + /** + * Constructs a new X509Parameters. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a X509Parameters. + * @implements IX509Parameters + * @constructor + * @param {google.cloud.security.privateca.v1.IX509Parameters=} [properties] Properties to set + */ + function X509Parameters(properties) { + this.policyIds = []; + this.aiaOcspServers = []; + this.additionalExtensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * X509Parameters keyUsage. + * @member {google.cloud.security.privateca.v1.IKeyUsage|null|undefined} keyUsage + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @instance + */ + X509Parameters.prototype.keyUsage = null; + + /** + * X509Parameters caOptions. + * @member {google.cloud.security.privateca.v1.X509Parameters.ICaOptions|null|undefined} caOptions + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @instance + */ + X509Parameters.prototype.caOptions = null; + + /** + * X509Parameters policyIds. + * @member {Array.} policyIds + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @instance + */ + X509Parameters.prototype.policyIds = $util.emptyArray; + + /** + * X509Parameters aiaOcspServers. + * @member {Array.} aiaOcspServers + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @instance + */ + X509Parameters.prototype.aiaOcspServers = $util.emptyArray; + + /** + * X509Parameters additionalExtensions. + * @member {Array.} additionalExtensions + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @instance + */ + X509Parameters.prototype.additionalExtensions = $util.emptyArray; + + /** + * Creates a new X509Parameters instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {google.cloud.security.privateca.v1.IX509Parameters=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.X509Parameters} X509Parameters instance + */ + X509Parameters.create = function create(properties) { + return new X509Parameters(properties); + }; + + /** + * Encodes the specified X509Parameters message. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {google.cloud.security.privateca.v1.IX509Parameters} message X509Parameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509Parameters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyUsage != null && Object.hasOwnProperty.call(message, "keyUsage")) + $root.google.cloud.security.privateca.v1.KeyUsage.encode(message.keyUsage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.caOptions != null && Object.hasOwnProperty.call(message, "caOptions")) + $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.encode(message.caOptions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.policyIds != null && message.policyIds.length) + for (var i = 0; i < message.policyIds.length; ++i) + $root.google.cloud.security.privateca.v1.ObjectId.encode(message.policyIds[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.aiaOcspServers != null && message.aiaOcspServers.length) + for (var i = 0; i < message.aiaOcspServers.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.aiaOcspServers[i]); + if (message.additionalExtensions != null && message.additionalExtensions.length) + for (var i = 0; i < message.additionalExtensions.length; ++i) + $root.google.cloud.security.privateca.v1.X509Extension.encode(message.additionalExtensions[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified X509Parameters message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {google.cloud.security.privateca.v1.IX509Parameters} message X509Parameters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509Parameters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a X509Parameters message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.X509Parameters} X509Parameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509Parameters.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.X509Parameters(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.decode(reader, reader.uint32()); + break; + case 2: + message.caOptions = $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.policyIds && message.policyIds.length)) + message.policyIds = []; + message.policyIds.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.aiaOcspServers && message.aiaOcspServers.length)) + message.aiaOcspServers = []; + message.aiaOcspServers.push(reader.string()); + break; + case 5: + if (!(message.additionalExtensions && message.additionalExtensions.length)) + message.additionalExtensions = []; + message.additionalExtensions.push($root.google.cloud.security.privateca.v1.X509Extension.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a X509Parameters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.X509Parameters} X509Parameters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509Parameters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a X509Parameters message. + * @function verify + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + X509Parameters.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyUsage != null && message.hasOwnProperty("keyUsage")) { + var error = $root.google.cloud.security.privateca.v1.KeyUsage.verify(message.keyUsage); + if (error) + return "keyUsage." + error; + } + if (message.caOptions != null && message.hasOwnProperty("caOptions")) { + var error = $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.verify(message.caOptions); + if (error) + return "caOptions." + error; + } + if (message.policyIds != null && message.hasOwnProperty("policyIds")) { + if (!Array.isArray(message.policyIds)) + return "policyIds: array expected"; + for (var i = 0; i < message.policyIds.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.ObjectId.verify(message.policyIds[i]); + if (error) + return "policyIds." + error; + } + } + if (message.aiaOcspServers != null && message.hasOwnProperty("aiaOcspServers")) { + if (!Array.isArray(message.aiaOcspServers)) + return "aiaOcspServers: array expected"; + for (var i = 0; i < message.aiaOcspServers.length; ++i) + if (!$util.isString(message.aiaOcspServers[i])) + return "aiaOcspServers: string[] expected"; + } + if (message.additionalExtensions != null && message.hasOwnProperty("additionalExtensions")) { + if (!Array.isArray(message.additionalExtensions)) + return "additionalExtensions: array expected"; + for (var i = 0; i < message.additionalExtensions.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.X509Extension.verify(message.additionalExtensions[i]); + if (error) + return "additionalExtensions." + error; + } + } + return null; + }; + + /** + * Creates a X509Parameters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.X509Parameters} X509Parameters + */ + X509Parameters.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.X509Parameters) + return object; + var message = new $root.google.cloud.security.privateca.v1.X509Parameters(); + if (object.keyUsage != null) { + if (typeof object.keyUsage !== "object") + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.keyUsage: object expected"); + message.keyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.fromObject(object.keyUsage); + } + if (object.caOptions != null) { + if (typeof object.caOptions !== "object") + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.caOptions: object expected"); + message.caOptions = $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.fromObject(object.caOptions); + } + if (object.policyIds) { + if (!Array.isArray(object.policyIds)) + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.policyIds: array expected"); + message.policyIds = []; + for (var i = 0; i < object.policyIds.length; ++i) { + if (typeof object.policyIds[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.policyIds: object expected"); + message.policyIds[i] = $root.google.cloud.security.privateca.v1.ObjectId.fromObject(object.policyIds[i]); + } + } + if (object.aiaOcspServers) { + if (!Array.isArray(object.aiaOcspServers)) + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.aiaOcspServers: array expected"); + message.aiaOcspServers = []; + for (var i = 0; i < object.aiaOcspServers.length; ++i) + message.aiaOcspServers[i] = String(object.aiaOcspServers[i]); + } + if (object.additionalExtensions) { + if (!Array.isArray(object.additionalExtensions)) + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.additionalExtensions: array expected"); + message.additionalExtensions = []; + for (var i = 0; i < object.additionalExtensions.length; ++i) { + if (typeof object.additionalExtensions[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.X509Parameters.additionalExtensions: object expected"); + message.additionalExtensions[i] = $root.google.cloud.security.privateca.v1.X509Extension.fromObject(object.additionalExtensions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a X509Parameters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {google.cloud.security.privateca.v1.X509Parameters} message X509Parameters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + X509Parameters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.policyIds = []; + object.aiaOcspServers = []; + object.additionalExtensions = []; + } + if (options.defaults) { + object.keyUsage = null; + object.caOptions = null; + } + if (message.keyUsage != null && message.hasOwnProperty("keyUsage")) + object.keyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.toObject(message.keyUsage, options); + if (message.caOptions != null && message.hasOwnProperty("caOptions")) + object.caOptions = $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.toObject(message.caOptions, options); + if (message.policyIds && message.policyIds.length) { + object.policyIds = []; + for (var j = 0; j < message.policyIds.length; ++j) + object.policyIds[j] = $root.google.cloud.security.privateca.v1.ObjectId.toObject(message.policyIds[j], options); + } + if (message.aiaOcspServers && message.aiaOcspServers.length) { + object.aiaOcspServers = []; + for (var j = 0; j < message.aiaOcspServers.length; ++j) + object.aiaOcspServers[j] = message.aiaOcspServers[j]; + } + if (message.additionalExtensions && message.additionalExtensions.length) { + object.additionalExtensions = []; + for (var j = 0; j < message.additionalExtensions.length; ++j) + object.additionalExtensions[j] = $root.google.cloud.security.privateca.v1.X509Extension.toObject(message.additionalExtensions[j], options); + } + return object; + }; + + /** + * Converts this X509Parameters to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @instance + * @returns {Object.} JSON object + */ + X509Parameters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + X509Parameters.CaOptions = (function() { + + /** + * Properties of a CaOptions. + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @interface ICaOptions + * @property {boolean|null} [isCa] CaOptions isCa + * @property {number|null} [maxIssuerPathLength] CaOptions maxIssuerPathLength + */ + + /** + * Constructs a new CaOptions. + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @classdesc Represents a CaOptions. + * @implements ICaOptions + * @constructor + * @param {google.cloud.security.privateca.v1.X509Parameters.ICaOptions=} [properties] Properties to set + */ + function CaOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CaOptions isCa. + * @member {boolean} isCa + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @instance + */ + CaOptions.prototype.isCa = false; + + /** + * CaOptions maxIssuerPathLength. + * @member {number} maxIssuerPathLength + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @instance + */ + CaOptions.prototype.maxIssuerPathLength = 0; + + /** + * Creates a new CaOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {google.cloud.security.privateca.v1.X509Parameters.ICaOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.X509Parameters.CaOptions} CaOptions instance + */ + CaOptions.create = function create(properties) { + return new CaOptions(properties); + }; + + /** + * Encodes the specified CaOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.CaOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {google.cloud.security.privateca.v1.X509Parameters.ICaOptions} message CaOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isCa != null && Object.hasOwnProperty.call(message, "isCa")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isCa); + if (message.maxIssuerPathLength != null && Object.hasOwnProperty.call(message, "maxIssuerPathLength")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxIssuerPathLength); + return writer; + }; + + /** + * Encodes the specified CaOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.X509Parameters.CaOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {google.cloud.security.privateca.v1.X509Parameters.ICaOptions} message CaOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CaOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CaOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.X509Parameters.CaOptions} CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.isCa = reader.bool(); + break; + case 2: + message.maxIssuerPathLength = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CaOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.X509Parameters.CaOptions} CaOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CaOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CaOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CaOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isCa != null && message.hasOwnProperty("isCa")) + if (typeof message.isCa !== "boolean") + return "isCa: boolean expected"; + if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) + if (!$util.isInteger(message.maxIssuerPathLength)) + return "maxIssuerPathLength: integer expected"; + return null; + }; + + /** + * Creates a CaOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.X509Parameters.CaOptions} CaOptions + */ + CaOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions(); + if (object.isCa != null) + message.isCa = Boolean(object.isCa); + if (object.maxIssuerPathLength != null) + message.maxIssuerPathLength = object.maxIssuerPathLength | 0; + return message; + }; + + /** + * Creates a plain object from a CaOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {google.cloud.security.privateca.v1.X509Parameters.CaOptions} message CaOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CaOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.isCa = false; + object.maxIssuerPathLength = 0; + } + if (message.isCa != null && message.hasOwnProperty("isCa")) + object.isCa = message.isCa; + if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) + object.maxIssuerPathLength = message.maxIssuerPathLength; + return object; + }; + + /** + * Converts this CaOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @instance + * @returns {Object.} JSON object + */ + CaOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CaOptions; + })(); + + return X509Parameters; + })(); + + v1.SubordinateConfig = (function() { + + /** + * Properties of a SubordinateConfig. + * @memberof google.cloud.security.privateca.v1 + * @interface ISubordinateConfig + * @property {string|null} [certificateAuthority] SubordinateConfig certificateAuthority + * @property {google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain|null} [pemIssuerChain] SubordinateConfig pemIssuerChain + */ + + /** + * Constructs a new SubordinateConfig. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a SubordinateConfig. + * @implements ISubordinateConfig + * @constructor + * @param {google.cloud.security.privateca.v1.ISubordinateConfig=} [properties] Properties to set + */ + function SubordinateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubordinateConfig certificateAuthority. + * @member {string} certificateAuthority + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @instance + */ + SubordinateConfig.prototype.certificateAuthority = ""; + + /** + * SubordinateConfig pemIssuerChain. + * @member {google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain|null|undefined} pemIssuerChain + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @instance + */ + SubordinateConfig.prototype.pemIssuerChain = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SubordinateConfig subordinateConfig. + * @member {"certificateAuthority"|"pemIssuerChain"|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @instance + */ + Object.defineProperty(SubordinateConfig.prototype, "subordinateConfig", { + get: $util.oneOfGetter($oneOfFields = ["certificateAuthority", "pemIssuerChain"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SubordinateConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1.ISubordinateConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.SubordinateConfig} SubordinateConfig instance + */ + SubordinateConfig.create = function create(properties) { + return new SubordinateConfig(properties); + }; + + /** + * Encodes the specified SubordinateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1.ISubordinateConfig} message SubordinateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateAuthority != null && Object.hasOwnProperty.call(message, "certificateAuthority")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.certificateAuthority); + if (message.pemIssuerChain != null && Object.hasOwnProperty.call(message, "pemIssuerChain")) + $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.encode(message.pemIssuerChain, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubordinateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1.ISubordinateConfig} message SubordinateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.SubordinateConfig} SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.SubordinateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateAuthority = reader.string(); + break; + case 2: + message.pemIssuerChain = $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubordinateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.SubordinateConfig} SubordinateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubordinateConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubordinateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + properties.subordinateConfig = 1; + if (!$util.isString(message.certificateAuthority)) + return "certificateAuthority: string expected"; + } + if (message.pemIssuerChain != null && message.hasOwnProperty("pemIssuerChain")) { + if (properties.subordinateConfig === 1) + return "subordinateConfig: multiple values"; + properties.subordinateConfig = 1; + { + var error = $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.verify(message.pemIssuerChain); + if (error) + return "pemIssuerChain." + error; + } + } + return null; + }; + + /** + * Creates a SubordinateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.SubordinateConfig} SubordinateConfig + */ + SubordinateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.SubordinateConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1.SubordinateConfig(); + if (object.certificateAuthority != null) + message.certificateAuthority = String(object.certificateAuthority); + if (object.pemIssuerChain != null) { + if (typeof object.pemIssuerChain !== "object") + throw TypeError(".google.cloud.security.privateca.v1.SubordinateConfig.pemIssuerChain: object expected"); + message.pemIssuerChain = $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.fromObject(object.pemIssuerChain); + } + return message; + }; + + /** + * Creates a plain object from a SubordinateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {google.cloud.security.privateca.v1.SubordinateConfig} message SubordinateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubordinateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + object.certificateAuthority = message.certificateAuthority; + if (options.oneofs) + object.subordinateConfig = "certificateAuthority"; + } + if (message.pemIssuerChain != null && message.hasOwnProperty("pemIssuerChain")) { + object.pemIssuerChain = $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.toObject(message.pemIssuerChain, options); + if (options.oneofs) + object.subordinateConfig = "pemIssuerChain"; + } + return object; + }; + + /** + * Converts this SubordinateConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @instance + * @returns {Object.} JSON object + */ + SubordinateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SubordinateConfig.SubordinateConfigChain = (function() { + + /** + * Properties of a SubordinateConfigChain. + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @interface ISubordinateConfigChain + * @property {Array.|null} [pemCertificates] SubordinateConfigChain pemCertificates + */ + + /** + * Constructs a new SubordinateConfigChain. + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @classdesc Represents a SubordinateConfigChain. + * @implements ISubordinateConfigChain + * @constructor + * @param {google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain=} [properties] Properties to set + */ + function SubordinateConfigChain(properties) { + this.pemCertificates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubordinateConfigChain pemCertificates. + * @member {Array.} pemCertificates + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @instance + */ + SubordinateConfigChain.prototype.pemCertificates = $util.emptyArray; + + /** + * Creates a new SubordinateConfigChain instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain instance + */ + SubordinateConfigChain.create = function create(properties) { + return new SubordinateConfigChain(properties); + }; + + /** + * Encodes the specified SubordinateConfigChain message. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain} message SubordinateConfigChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfigChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pemCertificates != null && message.pemCertificates.length) + for (var i = 0; i < message.pemCertificates.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pemCertificates[i]); + return writer; + }; + + /** + * Encodes the specified SubordinateConfigChain message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain} message SubordinateConfigChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubordinateConfigChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfigChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pemCertificates && message.pemCertificates.length)) + message.pemCertificates = []; + message.pemCertificates.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubordinateConfigChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubordinateConfigChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubordinateConfigChain message. + * @function verify + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubordinateConfigChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pemCertificates != null && message.hasOwnProperty("pemCertificates")) { + if (!Array.isArray(message.pemCertificates)) + return "pemCertificates: array expected"; + for (var i = 0; i < message.pemCertificates.length; ++i) + if (!$util.isString(message.pemCertificates[i])) + return "pemCertificates: string[] expected"; + } + return null; + }; + + /** + * Creates a SubordinateConfigChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain} SubordinateConfigChain + */ + SubordinateConfigChain.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain) + return object; + var message = new $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain(); + if (object.pemCertificates) { + if (!Array.isArray(object.pemCertificates)) + throw TypeError(".google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.pemCertificates: array expected"); + message.pemCertificates = []; + for (var i = 0; i < object.pemCertificates.length; ++i) + message.pemCertificates[i] = String(object.pemCertificates[i]); + } + return message; + }; + + /** + * Creates a plain object from a SubordinateConfigChain message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain} message SubordinateConfigChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubordinateConfigChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pemCertificates = []; + if (message.pemCertificates && message.pemCertificates.length) { + object.pemCertificates = []; + for (var j = 0; j < message.pemCertificates.length; ++j) + object.pemCertificates[j] = message.pemCertificates[j]; + } + return object; + }; + + /** + * Converts this SubordinateConfigChain to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @instance + * @returns {Object.} JSON object + */ + SubordinateConfigChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubordinateConfigChain; + })(); + + return SubordinateConfig; + })(); + + v1.PublicKey = (function() { + + /** + * Properties of a PublicKey. + * @memberof google.cloud.security.privateca.v1 + * @interface IPublicKey + * @property {Uint8Array|null} [key] PublicKey key + * @property {google.cloud.security.privateca.v1.PublicKey.KeyFormat|null} [format] PublicKey format + */ + + /** + * Constructs a new PublicKey. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {google.cloud.security.privateca.v1.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey key. + * @member {Uint8Array} key + * @memberof google.cloud.security.privateca.v1.PublicKey + * @instance + */ + PublicKey.prototype.key = $util.newBuffer([]); + + /** + * PublicKey format. + * @member {google.cloud.security.privateca.v1.PublicKey.KeyFormat} format + * @memberof google.cloud.security.privateca.v1.PublicKey + * @instance + */ + PublicKey.prototype.format = 0; + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1.IPublicKey=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link google.cloud.security.privateca.v1.PublicKey.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.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).bytes(message.key); + if (message.format != null && Object.hasOwnProperty.call(message, "format")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.format); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.PublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.format = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.format != null && message.hasOwnProperty("format")) + switch (message.format) { + default: + return "format: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.PublicKey) + return object; + var message = new $root.google.cloud.security.privateca.v1.PublicKey(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + switch (object.format) { + case "KEY_FORMAT_UNSPECIFIED": + case 0: + message.format = 0; + break; + case "PEM": + case 1: + message.format = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {google.cloud.security.privateca.v1.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + object.format = options.enums === String ? "KEY_FORMAT_UNSPECIFIED" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.format != null && message.hasOwnProperty("format")) + object.format = options.enums === String ? $root.google.cloud.security.privateca.v1.PublicKey.KeyFormat[message.format] : message.format; + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * KeyFormat enum. + * @name google.cloud.security.privateca.v1.PublicKey.KeyFormat + * @enum {number} + * @property {number} KEY_FORMAT_UNSPECIFIED=0 KEY_FORMAT_UNSPECIFIED value + * @property {number} PEM=1 PEM value + */ + PublicKey.KeyFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_FORMAT_UNSPECIFIED"] = 0; + values[valuesById[1] = "PEM"] = 1; + return values; + })(); + + return PublicKey; + })(); + + v1.CertificateConfig = (function() { + + /** + * Properties of a CertificateConfig. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificateConfig + * @property {google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig|null} [subjectConfig] CertificateConfig subjectConfig + * @property {google.cloud.security.privateca.v1.IX509Parameters|null} [x509Config] CertificateConfig x509Config + * @property {google.cloud.security.privateca.v1.IPublicKey|null} [publicKey] CertificateConfig publicKey + */ + + /** + * Constructs a new CertificateConfig. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateConfig. + * @implements ICertificateConfig + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificateConfig=} [properties] Properties to set + */ + function CertificateConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateConfig subjectConfig. + * @member {google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig|null|undefined} subjectConfig + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @instance + */ + CertificateConfig.prototype.subjectConfig = null; + + /** + * CertificateConfig x509Config. + * @member {google.cloud.security.privateca.v1.IX509Parameters|null|undefined} x509Config + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @instance + */ + CertificateConfig.prototype.x509Config = null; + + /** + * CertificateConfig publicKey. + * @member {google.cloud.security.privateca.v1.IPublicKey|null|undefined} publicKey + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @instance + */ + CertificateConfig.prototype.publicKey = null; + + /** + * Creates a new CertificateConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1.ICertificateConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateConfig} CertificateConfig instance + */ + CertificateConfig.create = function create(properties) { + return new CertificateConfig(properties); + }; + + /** + * Encodes the specified CertificateConfig message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1.ICertificateConfig} message CertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subjectConfig != null && Object.hasOwnProperty.call(message, "subjectConfig")) + $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.encode(message.subjectConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.x509Config != null && Object.hasOwnProperty.call(message, "x509Config")) + $root.google.cloud.security.privateca.v1.X509Parameters.encode(message.x509Config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.cloud.security.privateca.v1.PublicKey.encode(message.publicKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1.ICertificateConfig} message CertificateConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateConfig} CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subjectConfig = $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.decode(reader, reader.uint32()); + break; + case 2: + message.x509Config = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + case 3: + message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateConfig} CertificateConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subjectConfig != null && message.hasOwnProperty("subjectConfig")) { + var error = $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.verify(message.subjectConfig); + if (error) + return "subjectConfig." + error; + } + if (message.x509Config != null && message.hasOwnProperty("x509Config")) { + var error = $root.google.cloud.security.privateca.v1.X509Parameters.verify(message.x509Config); + if (error) + return "x509Config." + error; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.cloud.security.privateca.v1.PublicKey.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + return null; + }; + + /** + * Creates a CertificateConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateConfig} CertificateConfig + */ + CertificateConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateConfig(); + if (object.subjectConfig != null) { + if (typeof object.subjectConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateConfig.subjectConfig: object expected"); + message.subjectConfig = $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.fromObject(object.subjectConfig); + } + if (object.x509Config != null) { + if (typeof object.x509Config !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateConfig.x509Config: object expected"); + message.x509Config = $root.google.cloud.security.privateca.v1.X509Parameters.fromObject(object.x509Config); + } + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateConfig.publicKey: object expected"); + message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.fromObject(object.publicKey); + } + return message; + }; + + /** + * Creates a plain object from a CertificateConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {google.cloud.security.privateca.v1.CertificateConfig} message CertificateConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subjectConfig = null; + object.x509Config = null; + object.publicKey = null; + } + if (message.subjectConfig != null && message.hasOwnProperty("subjectConfig")) + object.subjectConfig = $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.toObject(message.subjectConfig, options); + if (message.x509Config != null && message.hasOwnProperty("x509Config")) + object.x509Config = $root.google.cloud.security.privateca.v1.X509Parameters.toObject(message.x509Config, options); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.toObject(message.publicKey, options); + return object; + }; + + /** + * Converts this CertificateConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @instance + * @returns {Object.} JSON object + */ + CertificateConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateConfig.SubjectConfig = (function() { + + /** + * Properties of a SubjectConfig. + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @interface ISubjectConfig + * @property {google.cloud.security.privateca.v1.ISubject|null} [subject] SubjectConfig subject + * @property {google.cloud.security.privateca.v1.ISubjectAltNames|null} [subjectAltName] SubjectConfig subjectAltName + */ + + /** + * Constructs a new SubjectConfig. + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @classdesc Represents a SubjectConfig. + * @implements ISubjectConfig + * @constructor + * @param {google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig=} [properties] Properties to set + */ + function SubjectConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubjectConfig subject. + * @member {google.cloud.security.privateca.v1.ISubject|null|undefined} subject + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @instance + */ + SubjectConfig.prototype.subject = null; + + /** + * SubjectConfig subjectAltName. + * @member {google.cloud.security.privateca.v1.ISubjectAltNames|null|undefined} subjectAltName + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @instance + */ + SubjectConfig.prototype.subjectAltName = null; + + /** + * Creates a new SubjectConfig instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig} SubjectConfig instance + */ + SubjectConfig.create = function create(properties) { + return new SubjectConfig(properties); + }; + + /** + * Encodes the specified SubjectConfig message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig} message SubjectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + $root.google.cloud.security.privateca.v1.Subject.encode(message.subject, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.subjectAltName != null && Object.hasOwnProperty.call(message, "subjectAltName")) + $root.google.cloud.security.privateca.v1.SubjectAltNames.encode(message.subjectAltName, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubjectConfig message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1.CertificateConfig.ISubjectConfig} message SubjectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig} SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subject = $root.google.cloud.security.privateca.v1.Subject.decode(reader, reader.uint32()); + break; + case 2: + message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubjectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig} SubjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubjectConfig message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubjectConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + var error = $root.google.cloud.security.privateca.v1.Subject.verify(message.subject); + if (error) + return "subject." + error; + } + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) { + var error = $root.google.cloud.security.privateca.v1.SubjectAltNames.verify(message.subjectAltName); + if (error) + return "subjectAltName." + error; + } + return null; + }; + + /** + * Creates a SubjectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig} SubjectConfig + */ + SubjectConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig(); + if (object.subject != null) { + if (typeof object.subject !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.subject: object expected"); + message.subject = $root.google.cloud.security.privateca.v1.Subject.fromObject(object.subject); + } + if (object.subjectAltName != null) { + if (typeof object.subjectAltName !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.subjectAltName: object expected"); + message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.fromObject(object.subjectAltName); + } + return message; + }; + + /** + * Creates a plain object from a SubjectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig} message SubjectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubjectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subject = null; + object.subjectAltName = null; + } + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = $root.google.cloud.security.privateca.v1.Subject.toObject(message.subject, options); + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) + object.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.toObject(message.subjectAltName, options); + return object; + }; + + /** + * Converts this SubjectConfig to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @instance + * @returns {Object.} JSON object + */ + SubjectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubjectConfig; + })(); + + return CertificateConfig; + })(); + + v1.CertificateDescription = (function() { + + /** + * Properties of a CertificateDescription. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificateDescription + * @property {google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription|null} [subjectDescription] CertificateDescription subjectDescription + * @property {google.cloud.security.privateca.v1.IX509Parameters|null} [x509Description] CertificateDescription x509Description + * @property {google.cloud.security.privateca.v1.IPublicKey|null} [publicKey] CertificateDescription publicKey + * @property {google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null} [subjectKeyId] CertificateDescription subjectKeyId + * @property {google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null} [authorityKeyId] CertificateDescription authorityKeyId + * @property {Array.|null} [crlDistributionPoints] CertificateDescription crlDistributionPoints + * @property {Array.|null} [aiaIssuingCertificateUrls] CertificateDescription aiaIssuingCertificateUrls + * @property {google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint|null} [certFingerprint] CertificateDescription certFingerprint + */ + + /** + * Constructs a new CertificateDescription. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateDescription. + * @implements ICertificateDescription + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificateDescription=} [properties] Properties to set + */ + function CertificateDescription(properties) { + this.crlDistributionPoints = []; + this.aiaIssuingCertificateUrls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateDescription subjectDescription. + * @member {google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription|null|undefined} subjectDescription + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.subjectDescription = null; + + /** + * CertificateDescription x509Description. + * @member {google.cloud.security.privateca.v1.IX509Parameters|null|undefined} x509Description + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.x509Description = null; + + /** + * CertificateDescription publicKey. + * @member {google.cloud.security.privateca.v1.IPublicKey|null|undefined} publicKey + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.publicKey = null; + + /** + * CertificateDescription subjectKeyId. + * @member {google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null|undefined} subjectKeyId + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.subjectKeyId = null; + + /** + * CertificateDescription authorityKeyId. + * @member {google.cloud.security.privateca.v1.CertificateDescription.IKeyId|null|undefined} authorityKeyId + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.authorityKeyId = null; + + /** + * CertificateDescription crlDistributionPoints. + * @member {Array.} crlDistributionPoints + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.crlDistributionPoints = $util.emptyArray; + + /** + * CertificateDescription aiaIssuingCertificateUrls. + * @member {Array.} aiaIssuingCertificateUrls + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.aiaIssuingCertificateUrls = $util.emptyArray; + + /** + * CertificateDescription certFingerprint. + * @member {google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint|null|undefined} certFingerprint + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + */ + CertificateDescription.prototype.certFingerprint = null; + + /** + * Creates a new CertificateDescription instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1.ICertificateDescription=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateDescription} CertificateDescription instance + */ + CertificateDescription.create = function create(properties) { + return new CertificateDescription(properties); + }; + + /** + * Encodes the specified CertificateDescription message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1.ICertificateDescription} message CertificateDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subjectDescription != null && Object.hasOwnProperty.call(message, "subjectDescription")) + $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.encode(message.subjectDescription, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.x509Description != null && Object.hasOwnProperty.call(message, "x509Description")) + $root.google.cloud.security.privateca.v1.X509Parameters.encode(message.x509Description, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.cloud.security.privateca.v1.PublicKey.encode(message.publicKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.subjectKeyId != null && Object.hasOwnProperty.call(message, "subjectKeyId")) + $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.encode(message.subjectKeyId, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.authorityKeyId != null && Object.hasOwnProperty.call(message, "authorityKeyId")) + $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.encode(message.authorityKeyId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.crlDistributionPoints != null && message.crlDistributionPoints.length) + for (var i = 0; i < message.crlDistributionPoints.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.crlDistributionPoints[i]); + if (message.aiaIssuingCertificateUrls != null && message.aiaIssuingCertificateUrls.length) + for (var i = 0; i < message.aiaIssuingCertificateUrls.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.aiaIssuingCertificateUrls[i]); + if (message.certFingerprint != null && Object.hasOwnProperty.call(message, "certFingerprint")) + $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.encode(message.certFingerprint, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1.ICertificateDescription} message CertificateDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateDescription} CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateDescription.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subjectDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.decode(reader, reader.uint32()); + break; + case 2: + message.x509Description = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + case 3: + message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.decode(reader, reader.uint32()); + break; + case 4: + message.subjectKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + case 5: + message.authorityKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + case 6: + if (!(message.crlDistributionPoints && message.crlDistributionPoints.length)) + message.crlDistributionPoints = []; + message.crlDistributionPoints.push(reader.string()); + break; + case 7: + if (!(message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length)) + message.aiaIssuingCertificateUrls = []; + message.aiaIssuingCertificateUrls.push(reader.string()); + break; + case 8: + message.certFingerprint = $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateDescription} CertificateDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateDescription message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateDescription.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subjectDescription != null && message.hasOwnProperty("subjectDescription")) { + var error = $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.verify(message.subjectDescription); + if (error) + return "subjectDescription." + error; + } + if (message.x509Description != null && message.hasOwnProperty("x509Description")) { + var error = $root.google.cloud.security.privateca.v1.X509Parameters.verify(message.x509Description); + if (error) + return "x509Description." + error; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.cloud.security.privateca.v1.PublicKey.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.subjectKeyId != null && message.hasOwnProperty("subjectKeyId")) { + var error = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.verify(message.subjectKeyId); + if (error) + return "subjectKeyId." + error; + } + if (message.authorityKeyId != null && message.hasOwnProperty("authorityKeyId")) { + var error = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.verify(message.authorityKeyId); + if (error) + return "authorityKeyId." + error; + } + if (message.crlDistributionPoints != null && message.hasOwnProperty("crlDistributionPoints")) { + if (!Array.isArray(message.crlDistributionPoints)) + return "crlDistributionPoints: array expected"; + for (var i = 0; i < message.crlDistributionPoints.length; ++i) + if (!$util.isString(message.crlDistributionPoints[i])) + return "crlDistributionPoints: string[] expected"; + } + if (message.aiaIssuingCertificateUrls != null && message.hasOwnProperty("aiaIssuingCertificateUrls")) { + if (!Array.isArray(message.aiaIssuingCertificateUrls)) + return "aiaIssuingCertificateUrls: array expected"; + for (var i = 0; i < message.aiaIssuingCertificateUrls.length; ++i) + if (!$util.isString(message.aiaIssuingCertificateUrls[i])) + return "aiaIssuingCertificateUrls: string[] expected"; + } + if (message.certFingerprint != null && message.hasOwnProperty("certFingerprint")) { + var error = $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.verify(message.certFingerprint); + if (error) + return "certFingerprint." + error; + } + return null; + }; + + /** + * Creates a CertificateDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateDescription} CertificateDescription + */ + CertificateDescription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateDescription) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateDescription(); + if (object.subjectDescription != null) { + if (typeof object.subjectDescription !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.subjectDescription: object expected"); + message.subjectDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.fromObject(object.subjectDescription); + } + if (object.x509Description != null) { + if (typeof object.x509Description !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.x509Description: object expected"); + message.x509Description = $root.google.cloud.security.privateca.v1.X509Parameters.fromObject(object.x509Description); + } + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.publicKey: object expected"); + message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.fromObject(object.publicKey); + } + if (object.subjectKeyId != null) { + if (typeof object.subjectKeyId !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.subjectKeyId: object expected"); + message.subjectKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.fromObject(object.subjectKeyId); + } + if (object.authorityKeyId != null) { + if (typeof object.authorityKeyId !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.authorityKeyId: object expected"); + message.authorityKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.fromObject(object.authorityKeyId); + } + if (object.crlDistributionPoints) { + if (!Array.isArray(object.crlDistributionPoints)) + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.crlDistributionPoints: array expected"); + message.crlDistributionPoints = []; + for (var i = 0; i < object.crlDistributionPoints.length; ++i) + message.crlDistributionPoints[i] = String(object.crlDistributionPoints[i]); + } + if (object.aiaIssuingCertificateUrls) { + if (!Array.isArray(object.aiaIssuingCertificateUrls)) + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.aiaIssuingCertificateUrls: array expected"); + message.aiaIssuingCertificateUrls = []; + for (var i = 0; i < object.aiaIssuingCertificateUrls.length; ++i) + message.aiaIssuingCertificateUrls[i] = String(object.aiaIssuingCertificateUrls[i]); + } + if (object.certFingerprint != null) { + if (typeof object.certFingerprint !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.certFingerprint: object expected"); + message.certFingerprint = $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.fromObject(object.certFingerprint); + } + return message; + }; + + /** + * Creates a plain object from a CertificateDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription} message CertificateDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.crlDistributionPoints = []; + object.aiaIssuingCertificateUrls = []; + } + if (options.defaults) { + object.subjectDescription = null; + object.x509Description = null; + object.publicKey = null; + object.subjectKeyId = null; + object.authorityKeyId = null; + object.certFingerprint = null; + } + if (message.subjectDescription != null && message.hasOwnProperty("subjectDescription")) + object.subjectDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.toObject(message.subjectDescription, options); + if (message.x509Description != null && message.hasOwnProperty("x509Description")) + object.x509Description = $root.google.cloud.security.privateca.v1.X509Parameters.toObject(message.x509Description, options); + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.toObject(message.publicKey, options); + if (message.subjectKeyId != null && message.hasOwnProperty("subjectKeyId")) + object.subjectKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.toObject(message.subjectKeyId, options); + if (message.authorityKeyId != null && message.hasOwnProperty("authorityKeyId")) + object.authorityKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.toObject(message.authorityKeyId, options); + if (message.crlDistributionPoints && message.crlDistributionPoints.length) { + object.crlDistributionPoints = []; + for (var j = 0; j < message.crlDistributionPoints.length; ++j) + object.crlDistributionPoints[j] = message.crlDistributionPoints[j]; + } + if (message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length) { + object.aiaIssuingCertificateUrls = []; + for (var j = 0; j < message.aiaIssuingCertificateUrls.length; ++j) + object.aiaIssuingCertificateUrls[j] = message.aiaIssuingCertificateUrls[j]; + } + if (message.certFingerprint != null && message.hasOwnProperty("certFingerprint")) + object.certFingerprint = $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.toObject(message.certFingerprint, options); + return object; + }; + + /** + * Converts this CertificateDescription to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @instance + * @returns {Object.} JSON object + */ + CertificateDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateDescription.SubjectDescription = (function() { + + /** + * Properties of a SubjectDescription. + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @interface ISubjectDescription + * @property {google.cloud.security.privateca.v1.ISubject|null} [subject] SubjectDescription subject + * @property {google.cloud.security.privateca.v1.ISubjectAltNames|null} [subjectAltName] SubjectDescription subjectAltName + * @property {string|null} [hexSerialNumber] SubjectDescription hexSerialNumber + * @property {google.protobuf.IDuration|null} [lifetime] SubjectDescription lifetime + * @property {google.protobuf.ITimestamp|null} [notBeforeTime] SubjectDescription notBeforeTime + * @property {google.protobuf.ITimestamp|null} [notAfterTime] SubjectDescription notAfterTime + */ + + /** + * Constructs a new SubjectDescription. + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @classdesc Represents a SubjectDescription. + * @implements ISubjectDescription + * @constructor + * @param {google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription=} [properties] Properties to set + */ + function SubjectDescription(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubjectDescription subject. + * @member {google.cloud.security.privateca.v1.ISubject|null|undefined} subject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.subject = null; + + /** + * SubjectDescription subjectAltName. + * @member {google.cloud.security.privateca.v1.ISubjectAltNames|null|undefined} subjectAltName + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.subjectAltName = null; + + /** + * SubjectDescription hexSerialNumber. + * @member {string} hexSerialNumber + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.hexSerialNumber = ""; + + /** + * SubjectDescription lifetime. + * @member {google.protobuf.IDuration|null|undefined} lifetime + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.lifetime = null; + + /** + * SubjectDescription notBeforeTime. + * @member {google.protobuf.ITimestamp|null|undefined} notBeforeTime + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.notBeforeTime = null; + + /** + * SubjectDescription notAfterTime. + * @member {google.protobuf.ITimestamp|null|undefined} notAfterTime + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + */ + SubjectDescription.prototype.notAfterTime = null; + + /** + * Creates a new SubjectDescription instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription} SubjectDescription instance + */ + SubjectDescription.create = function create(properties) { + return new SubjectDescription(properties); + }; + + /** + * Encodes the specified SubjectDescription message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription} message SubjectDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + $root.google.cloud.security.privateca.v1.Subject.encode(message.subject, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.subjectAltName != null && Object.hasOwnProperty.call(message, "subjectAltName")) + $root.google.cloud.security.privateca.v1.SubjectAltNames.encode(message.subjectAltName, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.hexSerialNumber != null && Object.hasOwnProperty.call(message, "hexSerialNumber")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.hexSerialNumber); + if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.notBeforeTime != null && Object.hasOwnProperty.call(message, "notBeforeTime")) + $root.google.protobuf.Timestamp.encode(message.notBeforeTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.notAfterTime != null && Object.hasOwnProperty.call(message, "notAfterTime")) + $root.google.protobuf.Timestamp.encode(message.notAfterTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubjectDescription message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.ISubjectDescription} message SubjectDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription} SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectDescription.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subject = $root.google.cloud.security.privateca.v1.Subject.decode(reader, reader.uint32()); + break; + case 2: + message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.decode(reader, reader.uint32()); + break; + case 3: + message.hexSerialNumber = reader.string(); + break; + case 4: + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 5: + message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubjectDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription} SubjectDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubjectDescription message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubjectDescription.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subject != null && message.hasOwnProperty("subject")) { + var error = $root.google.cloud.security.privateca.v1.Subject.verify(message.subject); + if (error) + return "subject." + error; + } + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) { + var error = $root.google.cloud.security.privateca.v1.SubjectAltNames.verify(message.subjectAltName); + if (error) + return "subjectAltName." + error; + } + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + if (!$util.isString(message.hexSerialNumber)) + return "hexSerialNumber: string expected"; + if (message.lifetime != null && message.hasOwnProperty("lifetime")) { + var error = $root.google.protobuf.Duration.verify(message.lifetime); + if (error) + return "lifetime." + error; + } + if (message.notBeforeTime != null && message.hasOwnProperty("notBeforeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.notBeforeTime); + if (error) + return "notBeforeTime." + error; + } + if (message.notAfterTime != null && message.hasOwnProperty("notAfterTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.notAfterTime); + if (error) + return "notAfterTime." + error; + } + return null; + }; + + /** + * Creates a SubjectDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription} SubjectDescription + */ + SubjectDescription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription(); + if (object.subject != null) { + if (typeof object.subject !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.subject: object expected"); + message.subject = $root.google.cloud.security.privateca.v1.Subject.fromObject(object.subject); + } + if (object.subjectAltName != null) { + if (typeof object.subjectAltName !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.subjectAltName: object expected"); + message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.fromObject(object.subjectAltName); + } + if (object.hexSerialNumber != null) + message.hexSerialNumber = String(object.hexSerialNumber); + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.notBeforeTime != null) { + if (typeof object.notBeforeTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.notBeforeTime: object expected"); + message.notBeforeTime = $root.google.protobuf.Timestamp.fromObject(object.notBeforeTime); + } + if (object.notAfterTime != null) { + if (typeof object.notAfterTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.notAfterTime: object expected"); + message.notAfterTime = $root.google.protobuf.Timestamp.fromObject(object.notAfterTime); + } + return message; + }; + + /** + * Creates a plain object from a SubjectDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription} message SubjectDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubjectDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subject = null; + object.subjectAltName = null; + object.hexSerialNumber = ""; + object.lifetime = null; + object.notBeforeTime = null; + object.notAfterTime = null; + } + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = $root.google.cloud.security.privateca.v1.Subject.toObject(message.subject, options); + if (message.subjectAltName != null && message.hasOwnProperty("subjectAltName")) + object.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.toObject(message.subjectAltName, options); + if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) + object.hexSerialNumber = message.hexSerialNumber; + if (message.lifetime != null && message.hasOwnProperty("lifetime")) + object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); + if (message.notBeforeTime != null && message.hasOwnProperty("notBeforeTime")) + object.notBeforeTime = $root.google.protobuf.Timestamp.toObject(message.notBeforeTime, options); + if (message.notAfterTime != null && message.hasOwnProperty("notAfterTime")) + object.notAfterTime = $root.google.protobuf.Timestamp.toObject(message.notAfterTime, options); + return object; + }; + + /** + * Converts this SubjectDescription to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @instance + * @returns {Object.} JSON object + */ + SubjectDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubjectDescription; + })(); + + CertificateDescription.KeyId = (function() { + + /** + * Properties of a KeyId. + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @interface IKeyId + * @property {string|null} [keyId] KeyId keyId + */ + + /** + * Constructs a new KeyId. + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @classdesc Represents a KeyId. + * @implements IKeyId + * @constructor + * @param {google.cloud.security.privateca.v1.CertificateDescription.IKeyId=} [properties] Properties to set + */ + function KeyId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyId keyId. + * @member {string} keyId + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @instance + */ + KeyId.prototype.keyId = ""; + + /** + * Creates a new KeyId instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.IKeyId=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateDescription.KeyId} KeyId instance + */ + KeyId.create = function create(properties) { + return new KeyId(properties); + }; + + /** + * Encodes the specified KeyId message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.KeyId.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.IKeyId} message KeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyId.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); + return writer; + }; + + /** + * Encodes the specified KeyId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.KeyId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.IKeyId} message KeyId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyId message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateDescription.KeyId} KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyId.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateDescription.KeyId} KeyId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyId message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyId.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"; + return null; + }; + + /** + * Creates a KeyId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateDescription.KeyId} KeyId + */ + KeyId.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId(); + if (object.keyId != null) + message.keyId = String(object.keyId); + return message; + }; + + /** + * Creates a plain object from a KeyId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.KeyId} message KeyId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyId = ""; + if (message.keyId != null && message.hasOwnProperty("keyId")) + object.keyId = message.keyId; + return object; + }; + + /** + * Converts this KeyId to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @instance + * @returns {Object.} JSON object + */ + KeyId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyId; + })(); + + CertificateDescription.CertificateFingerprint = (function() { + + /** + * Properties of a CertificateFingerprint. + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @interface ICertificateFingerprint + * @property {string|null} [sha256Hash] CertificateFingerprint sha256Hash + */ + + /** + * Constructs a new CertificateFingerprint. + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @classdesc Represents a CertificateFingerprint. + * @implements ICertificateFingerprint + * @constructor + * @param {google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint=} [properties] Properties to set + */ + function CertificateFingerprint(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateFingerprint sha256Hash. + * @member {string} sha256Hash + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @instance + */ + CertificateFingerprint.prototype.sha256Hash = ""; + + /** + * Creates a new CertificateFingerprint instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint} CertificateFingerprint instance + */ + CertificateFingerprint.create = function create(properties) { + return new CertificateFingerprint(properties); + }; + + /** + * Encodes the specified CertificateFingerprint message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint} message CertificateFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateFingerprint.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sha256Hash != null && Object.hasOwnProperty.call(message, "sha256Hash")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sha256Hash); + return writer; + }; + + /** + * Encodes the specified CertificateFingerprint message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.ICertificateFingerprint} message CertificateFingerprint message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateFingerprint.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint} CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateFingerprint.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sha256Hash = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateFingerprint message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint} CertificateFingerprint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateFingerprint.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateFingerprint message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateFingerprint.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sha256Hash != null && message.hasOwnProperty("sha256Hash")) + if (!$util.isString(message.sha256Hash)) + return "sha256Hash: string expected"; + return null; + }; + + /** + * Creates a CertificateFingerprint message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint} CertificateFingerprint + */ + CertificateFingerprint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint(); + if (object.sha256Hash != null) + message.sha256Hash = String(object.sha256Hash); + return message; + }; + + /** + * Creates a plain object from a CertificateFingerprint message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint} message CertificateFingerprint + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateFingerprint.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.sha256Hash = ""; + if (message.sha256Hash != null && message.hasOwnProperty("sha256Hash")) + object.sha256Hash = message.sha256Hash; + return object; + }; + + /** + * Converts this CertificateFingerprint to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @instance + * @returns {Object.} JSON object + */ + CertificateFingerprint.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertificateFingerprint; + })(); + + return CertificateDescription; + })(); + + v1.ObjectId = (function() { + + /** + * Properties of an ObjectId. + * @memberof google.cloud.security.privateca.v1 + * @interface IObjectId + * @property {Array.|null} [objectIdPath] ObjectId objectIdPath + */ + + /** + * Constructs a new ObjectId. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an ObjectId. + * @implements IObjectId + * @constructor + * @param {google.cloud.security.privateca.v1.IObjectId=} [properties] Properties to set + */ + function ObjectId(properties) { + this.objectIdPath = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ObjectId objectIdPath. + * @member {Array.} objectIdPath + * @memberof google.cloud.security.privateca.v1.ObjectId + * @instance + */ + ObjectId.prototype.objectIdPath = $util.emptyArray; + + /** + * Creates a new ObjectId instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1.IObjectId=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ObjectId} ObjectId instance + */ + ObjectId.create = function create(properties) { + return new ObjectId(properties); + }; + + /** + * Encodes the specified ObjectId message. Does not implicitly {@link google.cloud.security.privateca.v1.ObjectId.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1.IObjectId} message ObjectId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObjectId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.objectIdPath != null && message.objectIdPath.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.objectIdPath.length; ++i) + writer.int32(message.objectIdPath[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ObjectId message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ObjectId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1.IObjectId} message ObjectId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ObjectId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ObjectId message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ObjectId} ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectId.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ObjectId(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.objectIdPath && message.objectIdPath.length)) + message.objectIdPath = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.objectIdPath.push(reader.int32()); + } else + message.objectIdPath.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ObjectId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ObjectId} ObjectId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ObjectId message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ObjectId.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.objectIdPath != null && message.hasOwnProperty("objectIdPath")) { + if (!Array.isArray(message.objectIdPath)) + return "objectIdPath: array expected"; + for (var i = 0; i < message.objectIdPath.length; ++i) + if (!$util.isInteger(message.objectIdPath[i])) + return "objectIdPath: integer[] expected"; + } + return null; + }; + + /** + * Creates an ObjectId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ObjectId} ObjectId + */ + ObjectId.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ObjectId) + return object; + var message = new $root.google.cloud.security.privateca.v1.ObjectId(); + if (object.objectIdPath) { + if (!Array.isArray(object.objectIdPath)) + throw TypeError(".google.cloud.security.privateca.v1.ObjectId.objectIdPath: array expected"); + message.objectIdPath = []; + for (var i = 0; i < object.objectIdPath.length; ++i) + message.objectIdPath[i] = object.objectIdPath[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from an ObjectId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {google.cloud.security.privateca.v1.ObjectId} message ObjectId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ObjectId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.objectIdPath = []; + if (message.objectIdPath && message.objectIdPath.length) { + object.objectIdPath = []; + for (var j = 0; j < message.objectIdPath.length; ++j) + object.objectIdPath[j] = message.objectIdPath[j]; + } + return object; + }; + + /** + * Converts this ObjectId to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ObjectId + * @instance + * @returns {Object.} JSON object + */ + ObjectId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ObjectId; + })(); + + v1.X509Extension = (function() { + + /** + * Properties of a X509Extension. + * @memberof google.cloud.security.privateca.v1 + * @interface IX509Extension + * @property {google.cloud.security.privateca.v1.IObjectId|null} [objectId] X509Extension objectId + * @property {boolean|null} [critical] X509Extension critical + * @property {Uint8Array|null} [value] X509Extension value + */ + + /** + * Constructs a new X509Extension. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a X509Extension. + * @implements IX509Extension + * @constructor + * @param {google.cloud.security.privateca.v1.IX509Extension=} [properties] Properties to set + */ + function X509Extension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * X509Extension objectId. + * @member {google.cloud.security.privateca.v1.IObjectId|null|undefined} objectId + * @memberof google.cloud.security.privateca.v1.X509Extension + * @instance + */ + X509Extension.prototype.objectId = null; + + /** + * X509Extension critical. + * @member {boolean} critical + * @memberof google.cloud.security.privateca.v1.X509Extension + * @instance + */ + X509Extension.prototype.critical = false; + + /** + * X509Extension value. + * @member {Uint8Array} value + * @memberof google.cloud.security.privateca.v1.X509Extension + * @instance + */ + X509Extension.prototype.value = $util.newBuffer([]); + + /** + * Creates a new X509Extension instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1.IX509Extension=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.X509Extension} X509Extension instance + */ + X509Extension.create = function create(properties) { + return new X509Extension(properties); + }; + + /** + * Encodes the specified X509Extension message. Does not implicitly {@link google.cloud.security.privateca.v1.X509Extension.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1.IX509Extension} message X509Extension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509Extension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.objectId != null && Object.hasOwnProperty.call(message, "objectId")) + $root.google.cloud.security.privateca.v1.ObjectId.encode(message.objectId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.critical != null && Object.hasOwnProperty.call(message, "critical")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.critical); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified X509Extension message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.X509Extension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1.IX509Extension} message X509Extension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + X509Extension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a X509Extension message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.X509Extension} X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509Extension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.X509Extension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.objectId = $root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32()); + break; + case 2: + message.critical = reader.bool(); + break; + case 3: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a X509Extension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.X509Extension} X509Extension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + X509Extension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a X509Extension message. + * @function verify + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + X509Extension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.objectId != null && message.hasOwnProperty("objectId")) { + var error = $root.google.cloud.security.privateca.v1.ObjectId.verify(message.objectId); + if (error) + return "objectId." + error; + } + if (message.critical != null && message.hasOwnProperty("critical")) + if (typeof message.critical !== "boolean") + return "critical: boolean 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 X509Extension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.X509Extension} X509Extension + */ + X509Extension.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.X509Extension) + return object; + var message = new $root.google.cloud.security.privateca.v1.X509Extension(); + if (object.objectId != null) { + if (typeof object.objectId !== "object") + throw TypeError(".google.cloud.security.privateca.v1.X509Extension.objectId: object expected"); + message.objectId = $root.google.cloud.security.privateca.v1.ObjectId.fromObject(object.objectId); + } + if (object.critical != null) + message.critical = Boolean(object.critical); + 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 X509Extension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {google.cloud.security.privateca.v1.X509Extension} message X509Extension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + X509Extension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.objectId = null; + object.critical = false; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.objectId != null && message.hasOwnProperty("objectId")) + object.objectId = $root.google.cloud.security.privateca.v1.ObjectId.toObject(message.objectId, options); + if (message.critical != null && message.hasOwnProperty("critical")) + object.critical = message.critical; + 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 X509Extension to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.X509Extension + * @instance + * @returns {Object.} JSON object + */ + X509Extension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return X509Extension; + })(); + + v1.KeyUsage = (function() { + + /** + * Properties of a KeyUsage. + * @memberof google.cloud.security.privateca.v1 + * @interface IKeyUsage + * @property {google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions|null} [baseKeyUsage] KeyUsage baseKeyUsage + * @property {google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions|null} [extendedKeyUsage] KeyUsage extendedKeyUsage + * @property {Array.|null} [unknownExtendedKeyUsages] KeyUsage unknownExtendedKeyUsages + */ + + /** + * Constructs a new KeyUsage. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a KeyUsage. + * @implements IKeyUsage + * @constructor + * @param {google.cloud.security.privateca.v1.IKeyUsage=} [properties] Properties to set + */ + function KeyUsage(properties) { + this.unknownExtendedKeyUsages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyUsage baseKeyUsage. + * @member {google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions|null|undefined} baseKeyUsage + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @instance + */ + KeyUsage.prototype.baseKeyUsage = null; + + /** + * KeyUsage extendedKeyUsage. + * @member {google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions|null|undefined} extendedKeyUsage + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @instance + */ + KeyUsage.prototype.extendedKeyUsage = null; + + /** + * KeyUsage unknownExtendedKeyUsages. + * @member {Array.} unknownExtendedKeyUsages + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @instance + */ + KeyUsage.prototype.unknownExtendedKeyUsages = $util.emptyArray; + + /** + * Creates a new KeyUsage instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1.IKeyUsage=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.KeyUsage} KeyUsage instance + */ + KeyUsage.create = function create(properties) { + return new KeyUsage(properties); + }; + + /** + * Encodes the specified KeyUsage message. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1.IKeyUsage} message KeyUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseKeyUsage != null && Object.hasOwnProperty.call(message, "baseKeyUsage")) + $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.encode(message.baseKeyUsage, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.extendedKeyUsage != null && Object.hasOwnProperty.call(message, "extendedKeyUsage")) + $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.encode(message.extendedKeyUsage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.unknownExtendedKeyUsages != null && message.unknownExtendedKeyUsages.length) + for (var i = 0; i < message.unknownExtendedKeyUsages.length; ++i) + $root.google.cloud.security.privateca.v1.ObjectId.encode(message.unknownExtendedKeyUsages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KeyUsage message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1.IKeyUsage} message KeyUsage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyUsage message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.KeyUsage} KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsage.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.KeyUsage(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.decode(reader, reader.uint32()); + break; + case 2: + message.extendedKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length)) + message.unknownExtendedKeyUsages = []; + message.unknownExtendedKeyUsages.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyUsage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.KeyUsage} KeyUsage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyUsage message. + * @function verify + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyUsage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseKeyUsage != null && message.hasOwnProperty("baseKeyUsage")) { + var error = $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.verify(message.baseKeyUsage); + if (error) + return "baseKeyUsage." + error; + } + if (message.extendedKeyUsage != null && message.hasOwnProperty("extendedKeyUsage")) { + var error = $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.verify(message.extendedKeyUsage); + if (error) + return "extendedKeyUsage." + error; + } + if (message.unknownExtendedKeyUsages != null && message.hasOwnProperty("unknownExtendedKeyUsages")) { + if (!Array.isArray(message.unknownExtendedKeyUsages)) + return "unknownExtendedKeyUsages: array expected"; + for (var i = 0; i < message.unknownExtendedKeyUsages.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.ObjectId.verify(message.unknownExtendedKeyUsages[i]); + if (error) + return "unknownExtendedKeyUsages." + error; + } + } + return null; + }; + + /** + * Creates a KeyUsage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.KeyUsage} KeyUsage + */ + KeyUsage.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.KeyUsage) + return object; + var message = new $root.google.cloud.security.privateca.v1.KeyUsage(); + if (object.baseKeyUsage != null) { + if (typeof object.baseKeyUsage !== "object") + throw TypeError(".google.cloud.security.privateca.v1.KeyUsage.baseKeyUsage: object expected"); + message.baseKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.fromObject(object.baseKeyUsage); + } + if (object.extendedKeyUsage != null) { + if (typeof object.extendedKeyUsage !== "object") + throw TypeError(".google.cloud.security.privateca.v1.KeyUsage.extendedKeyUsage: object expected"); + message.extendedKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.fromObject(object.extendedKeyUsage); + } + if (object.unknownExtendedKeyUsages) { + if (!Array.isArray(object.unknownExtendedKeyUsages)) + throw TypeError(".google.cloud.security.privateca.v1.KeyUsage.unknownExtendedKeyUsages: array expected"); + message.unknownExtendedKeyUsages = []; + for (var i = 0; i < object.unknownExtendedKeyUsages.length; ++i) { + if (typeof object.unknownExtendedKeyUsages[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.KeyUsage.unknownExtendedKeyUsages: object expected"); + message.unknownExtendedKeyUsages[i] = $root.google.cloud.security.privateca.v1.ObjectId.fromObject(object.unknownExtendedKeyUsages[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a KeyUsage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage} message KeyUsage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyUsage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.unknownExtendedKeyUsages = []; + if (options.defaults) { + object.baseKeyUsage = null; + object.extendedKeyUsage = null; + } + if (message.baseKeyUsage != null && message.hasOwnProperty("baseKeyUsage")) + object.baseKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.toObject(message.baseKeyUsage, options); + if (message.extendedKeyUsage != null && message.hasOwnProperty("extendedKeyUsage")) + object.extendedKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.toObject(message.extendedKeyUsage, options); + if (message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length) { + object.unknownExtendedKeyUsages = []; + for (var j = 0; j < message.unknownExtendedKeyUsages.length; ++j) + object.unknownExtendedKeyUsages[j] = $root.google.cloud.security.privateca.v1.ObjectId.toObject(message.unknownExtendedKeyUsages[j], options); + } + return object; + }; + + /** + * Converts this KeyUsage to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @instance + * @returns {Object.} JSON object + */ + KeyUsage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + KeyUsage.KeyUsageOptions = (function() { + + /** + * Properties of a KeyUsageOptions. + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @interface IKeyUsageOptions + * @property {boolean|null} [digitalSignature] KeyUsageOptions digitalSignature + * @property {boolean|null} [contentCommitment] KeyUsageOptions contentCommitment + * @property {boolean|null} [keyEncipherment] KeyUsageOptions keyEncipherment + * @property {boolean|null} [dataEncipherment] KeyUsageOptions dataEncipherment + * @property {boolean|null} [keyAgreement] KeyUsageOptions keyAgreement + * @property {boolean|null} [certSign] KeyUsageOptions certSign + * @property {boolean|null} [crlSign] KeyUsageOptions crlSign + * @property {boolean|null} [encipherOnly] KeyUsageOptions encipherOnly + * @property {boolean|null} [decipherOnly] KeyUsageOptions decipherOnly + */ + + /** + * Constructs a new KeyUsageOptions. + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @classdesc Represents a KeyUsageOptions. + * @implements IKeyUsageOptions + * @constructor + * @param {google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions=} [properties] Properties to set + */ + function KeyUsageOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyUsageOptions digitalSignature. + * @member {boolean} digitalSignature + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.digitalSignature = false; + + /** + * KeyUsageOptions contentCommitment. + * @member {boolean} contentCommitment + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.contentCommitment = false; + + /** + * KeyUsageOptions keyEncipherment. + * @member {boolean} keyEncipherment + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.keyEncipherment = false; + + /** + * KeyUsageOptions dataEncipherment. + * @member {boolean} dataEncipherment + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.dataEncipherment = false; + + /** + * KeyUsageOptions keyAgreement. + * @member {boolean} keyAgreement + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.keyAgreement = false; + + /** + * KeyUsageOptions certSign. + * @member {boolean} certSign + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.certSign = false; + + /** + * KeyUsageOptions crlSign. + * @member {boolean} crlSign + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.crlSign = false; + + /** + * KeyUsageOptions encipherOnly. + * @member {boolean} encipherOnly + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.encipherOnly = false; + + /** + * KeyUsageOptions decipherOnly. + * @member {boolean} decipherOnly + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + */ + KeyUsageOptions.prototype.decipherOnly = false; + + /** + * Creates a new KeyUsageOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions} KeyUsageOptions instance + */ + KeyUsageOptions.create = function create(properties) { + return new KeyUsageOptions(properties); + }; + + /** + * Encodes the specified KeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions} message KeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.digitalSignature != null && Object.hasOwnProperty.call(message, "digitalSignature")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.digitalSignature); + if (message.contentCommitment != null && Object.hasOwnProperty.call(message, "contentCommitment")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.contentCommitment); + if (message.keyEncipherment != null && Object.hasOwnProperty.call(message, "keyEncipherment")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.keyEncipherment); + if (message.dataEncipherment != null && Object.hasOwnProperty.call(message, "dataEncipherment")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dataEncipherment); + if (message.keyAgreement != null && Object.hasOwnProperty.call(message, "keyAgreement")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.keyAgreement); + if (message.certSign != null && Object.hasOwnProperty.call(message, "certSign")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.certSign); + if (message.crlSign != null && Object.hasOwnProperty.call(message, "crlSign")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.crlSign); + if (message.encipherOnly != null && Object.hasOwnProperty.call(message, "encipherOnly")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.encipherOnly); + if (message.decipherOnly != null && Object.hasOwnProperty.call(message, "decipherOnly")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.decipherOnly); + return writer; + }; + + /** + * Encodes the specified KeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.IKeyUsageOptions} message KeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyUsageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions} KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.digitalSignature = reader.bool(); + break; + case 2: + message.contentCommitment = reader.bool(); + break; + case 3: + message.keyEncipherment = reader.bool(); + break; + case 4: + message.dataEncipherment = reader.bool(); + break; + case 5: + message.keyAgreement = reader.bool(); + break; + case 6: + message.certSign = reader.bool(); + break; + case 7: + message.crlSign = reader.bool(); + break; + case 8: + message.encipherOnly = reader.bool(); + break; + case 9: + message.decipherOnly = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyUsageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions} KeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyUsageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyUsageOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyUsageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.digitalSignature != null && message.hasOwnProperty("digitalSignature")) + if (typeof message.digitalSignature !== "boolean") + return "digitalSignature: boolean expected"; + if (message.contentCommitment != null && message.hasOwnProperty("contentCommitment")) + if (typeof message.contentCommitment !== "boolean") + return "contentCommitment: boolean expected"; + if (message.keyEncipherment != null && message.hasOwnProperty("keyEncipherment")) + if (typeof message.keyEncipherment !== "boolean") + return "keyEncipherment: boolean expected"; + if (message.dataEncipherment != null && message.hasOwnProperty("dataEncipherment")) + if (typeof message.dataEncipherment !== "boolean") + return "dataEncipherment: boolean expected"; + if (message.keyAgreement != null && message.hasOwnProperty("keyAgreement")) + if (typeof message.keyAgreement !== "boolean") + return "keyAgreement: boolean expected"; + if (message.certSign != null && message.hasOwnProperty("certSign")) + if (typeof message.certSign !== "boolean") + return "certSign: boolean expected"; + if (message.crlSign != null && message.hasOwnProperty("crlSign")) + if (typeof message.crlSign !== "boolean") + return "crlSign: boolean expected"; + if (message.encipherOnly != null && message.hasOwnProperty("encipherOnly")) + if (typeof message.encipherOnly !== "boolean") + return "encipherOnly: boolean expected"; + if (message.decipherOnly != null && message.hasOwnProperty("decipherOnly")) + if (typeof message.decipherOnly !== "boolean") + return "decipherOnly: boolean expected"; + return null; + }; + + /** + * Creates a KeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions} KeyUsageOptions + */ + KeyUsageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions(); + if (object.digitalSignature != null) + message.digitalSignature = Boolean(object.digitalSignature); + if (object.contentCommitment != null) + message.contentCommitment = Boolean(object.contentCommitment); + if (object.keyEncipherment != null) + message.keyEncipherment = Boolean(object.keyEncipherment); + if (object.dataEncipherment != null) + message.dataEncipherment = Boolean(object.dataEncipherment); + if (object.keyAgreement != null) + message.keyAgreement = Boolean(object.keyAgreement); + if (object.certSign != null) + message.certSign = Boolean(object.certSign); + if (object.crlSign != null) + message.crlSign = Boolean(object.crlSign); + if (object.encipherOnly != null) + message.encipherOnly = Boolean(object.encipherOnly); + if (object.decipherOnly != null) + message.decipherOnly = Boolean(object.decipherOnly); + return message; + }; + + /** + * Creates a plain object from a KeyUsageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions} message KeyUsageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyUsageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.digitalSignature = false; + object.contentCommitment = false; + object.keyEncipherment = false; + object.dataEncipherment = false; + object.keyAgreement = false; + object.certSign = false; + object.crlSign = false; + object.encipherOnly = false; + object.decipherOnly = false; + } + if (message.digitalSignature != null && message.hasOwnProperty("digitalSignature")) + object.digitalSignature = message.digitalSignature; + if (message.contentCommitment != null && message.hasOwnProperty("contentCommitment")) + object.contentCommitment = message.contentCommitment; + if (message.keyEncipherment != null && message.hasOwnProperty("keyEncipherment")) + object.keyEncipherment = message.keyEncipherment; + if (message.dataEncipherment != null && message.hasOwnProperty("dataEncipherment")) + object.dataEncipherment = message.dataEncipherment; + if (message.keyAgreement != null && message.hasOwnProperty("keyAgreement")) + object.keyAgreement = message.keyAgreement; + if (message.certSign != null && message.hasOwnProperty("certSign")) + object.certSign = message.certSign; + if (message.crlSign != null && message.hasOwnProperty("crlSign")) + object.crlSign = message.crlSign; + if (message.encipherOnly != null && message.hasOwnProperty("encipherOnly")) + object.encipherOnly = message.encipherOnly; + if (message.decipherOnly != null && message.hasOwnProperty("decipherOnly")) + object.decipherOnly = message.decipherOnly; + return object; + }; + + /** + * Converts this KeyUsageOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @instance + * @returns {Object.} JSON object + */ + KeyUsageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyUsageOptions; + })(); + + KeyUsage.ExtendedKeyUsageOptions = (function() { + + /** + * Properties of an ExtendedKeyUsageOptions. + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @interface IExtendedKeyUsageOptions + * @property {boolean|null} [serverAuth] ExtendedKeyUsageOptions serverAuth + * @property {boolean|null} [clientAuth] ExtendedKeyUsageOptions clientAuth + * @property {boolean|null} [codeSigning] ExtendedKeyUsageOptions codeSigning + * @property {boolean|null} [emailProtection] ExtendedKeyUsageOptions emailProtection + * @property {boolean|null} [timeStamping] ExtendedKeyUsageOptions timeStamping + * @property {boolean|null} [ocspSigning] ExtendedKeyUsageOptions ocspSigning + */ + + /** + * Constructs a new ExtendedKeyUsageOptions. + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @classdesc Represents an ExtendedKeyUsageOptions. + * @implements IExtendedKeyUsageOptions + * @constructor + * @param {google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions=} [properties] Properties to set + */ + function ExtendedKeyUsageOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtendedKeyUsageOptions serverAuth. + * @member {boolean} serverAuth + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.serverAuth = false; + + /** + * ExtendedKeyUsageOptions clientAuth. + * @member {boolean} clientAuth + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.clientAuth = false; + + /** + * ExtendedKeyUsageOptions codeSigning. + * @member {boolean} codeSigning + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.codeSigning = false; + + /** + * ExtendedKeyUsageOptions emailProtection. + * @member {boolean} emailProtection + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.emailProtection = false; + + /** + * ExtendedKeyUsageOptions timeStamping. + * @member {boolean} timeStamping + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.timeStamping = false; + + /** + * ExtendedKeyUsageOptions ocspSigning. + * @member {boolean} ocspSigning + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + */ + ExtendedKeyUsageOptions.prototype.ocspSigning = false; + + /** + * Creates a new ExtendedKeyUsageOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions instance + */ + ExtendedKeyUsageOptions.create = function create(properties) { + return new ExtendedKeyUsageOptions(properties); + }; + + /** + * Encodes the specified ExtendedKeyUsageOptions message. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions} message ExtendedKeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedKeyUsageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.serverAuth != null && Object.hasOwnProperty.call(message, "serverAuth")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.serverAuth); + if (message.clientAuth != null && Object.hasOwnProperty.call(message, "clientAuth")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clientAuth); + if (message.codeSigning != null && Object.hasOwnProperty.call(message, "codeSigning")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.codeSigning); + if (message.emailProtection != null && Object.hasOwnProperty.call(message, "emailProtection")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.emailProtection); + if (message.timeStamping != null && Object.hasOwnProperty.call(message, "timeStamping")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.timeStamping); + if (message.ocspSigning != null && Object.hasOwnProperty.call(message, "ocspSigning")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.ocspSigning); + return writer; + }; + + /** + * Encodes the specified ExtendedKeyUsageOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.IExtendedKeyUsageOptions} message ExtendedKeyUsageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtendedKeyUsageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedKeyUsageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.serverAuth = reader.bool(); + break; + case 2: + message.clientAuth = reader.bool(); + break; + case 3: + message.codeSigning = reader.bool(); + break; + case 4: + message.emailProtection = reader.bool(); + break; + case 5: + message.timeStamping = reader.bool(); + break; + case 6: + message.ocspSigning = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtendedKeyUsageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtendedKeyUsageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtendedKeyUsageOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtendedKeyUsageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.serverAuth != null && message.hasOwnProperty("serverAuth")) + if (typeof message.serverAuth !== "boolean") + return "serverAuth: boolean expected"; + if (message.clientAuth != null && message.hasOwnProperty("clientAuth")) + if (typeof message.clientAuth !== "boolean") + return "clientAuth: boolean expected"; + if (message.codeSigning != null && message.hasOwnProperty("codeSigning")) + if (typeof message.codeSigning !== "boolean") + return "codeSigning: boolean expected"; + if (message.emailProtection != null && message.hasOwnProperty("emailProtection")) + if (typeof message.emailProtection !== "boolean") + return "emailProtection: boolean expected"; + if (message.timeStamping != null && message.hasOwnProperty("timeStamping")) + if (typeof message.timeStamping !== "boolean") + return "timeStamping: boolean expected"; + if (message.ocspSigning != null && message.hasOwnProperty("ocspSigning")) + if (typeof message.ocspSigning !== "boolean") + return "ocspSigning: boolean expected"; + return null; + }; + + /** + * Creates an ExtendedKeyUsageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions} ExtendedKeyUsageOptions + */ + ExtendedKeyUsageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions(); + if (object.serverAuth != null) + message.serverAuth = Boolean(object.serverAuth); + if (object.clientAuth != null) + message.clientAuth = Boolean(object.clientAuth); + if (object.codeSigning != null) + message.codeSigning = Boolean(object.codeSigning); + if (object.emailProtection != null) + message.emailProtection = Boolean(object.emailProtection); + if (object.timeStamping != null) + message.timeStamping = Boolean(object.timeStamping); + if (object.ocspSigning != null) + message.ocspSigning = Boolean(object.ocspSigning); + return message; + }; + + /** + * Creates a plain object from an ExtendedKeyUsageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions} message ExtendedKeyUsageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtendedKeyUsageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.serverAuth = false; + object.clientAuth = false; + object.codeSigning = false; + object.emailProtection = false; + object.timeStamping = false; + object.ocspSigning = false; + } + if (message.serverAuth != null && message.hasOwnProperty("serverAuth")) + object.serverAuth = message.serverAuth; + if (message.clientAuth != null && message.hasOwnProperty("clientAuth")) + object.clientAuth = message.clientAuth; + if (message.codeSigning != null && message.hasOwnProperty("codeSigning")) + object.codeSigning = message.codeSigning; + if (message.emailProtection != null && message.hasOwnProperty("emailProtection")) + object.emailProtection = message.emailProtection; + if (message.timeStamping != null && message.hasOwnProperty("timeStamping")) + object.timeStamping = message.timeStamping; + if (message.ocspSigning != null && message.hasOwnProperty("ocspSigning")) + object.ocspSigning = message.ocspSigning; + return object; + }; + + /** + * Converts this ExtendedKeyUsageOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @instance + * @returns {Object.} JSON object + */ + ExtendedKeyUsageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtendedKeyUsageOptions; + })(); + + return KeyUsage; + })(); + + v1.Subject = (function() { + + /** + * Properties of a Subject. + * @memberof google.cloud.security.privateca.v1 + * @interface ISubject + * @property {string|null} [commonName] Subject commonName + * @property {string|null} [countryCode] Subject countryCode + * @property {string|null} [organization] Subject organization + * @property {string|null} [organizationalUnit] Subject organizationalUnit + * @property {string|null} [locality] Subject locality + * @property {string|null} [province] Subject province + * @property {string|null} [streetAddress] Subject streetAddress + * @property {string|null} [postalCode] Subject postalCode + */ + + /** + * Constructs a new Subject. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a Subject. + * @implements ISubject + * @constructor + * @param {google.cloud.security.privateca.v1.ISubject=} [properties] Properties to set + */ + function Subject(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Subject commonName. + * @member {string} commonName + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.commonName = ""; + + /** + * Subject countryCode. + * @member {string} countryCode + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.countryCode = ""; + + /** + * Subject organization. + * @member {string} organization + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.organization = ""; + + /** + * Subject organizationalUnit. + * @member {string} organizationalUnit + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.organizationalUnit = ""; + + /** + * Subject locality. + * @member {string} locality + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.locality = ""; + + /** + * Subject province. + * @member {string} province + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.province = ""; + + /** + * Subject streetAddress. + * @member {string} streetAddress + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.streetAddress = ""; + + /** + * Subject postalCode. + * @member {string} postalCode + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + */ + Subject.prototype.postalCode = ""; + + /** + * Creates a new Subject instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {google.cloud.security.privateca.v1.ISubject=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.Subject} Subject instance + */ + Subject.create = function create(properties) { + return new Subject(properties); + }; + + /** + * Encodes the specified Subject message. Does not implicitly {@link google.cloud.security.privateca.v1.Subject.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {google.cloud.security.privateca.v1.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commonName != null && Object.hasOwnProperty.call(message, "commonName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.commonName); + if (message.countryCode != null && Object.hasOwnProperty.call(message, "countryCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.countryCode); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.organization); + if (message.organizationalUnit != null && Object.hasOwnProperty.call(message, "organizationalUnit")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.organizationalUnit); + if (message.locality != null && Object.hasOwnProperty.call(message, "locality")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locality); + if (message.province != null && Object.hasOwnProperty.call(message, "province")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.province); + if (message.streetAddress != null && Object.hasOwnProperty.call(message, "streetAddress")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.streetAddress); + if (message.postalCode != null && Object.hasOwnProperty.call(message, "postalCode")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.postalCode); + return writer; + }; + + /** + * Encodes the specified Subject message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.Subject.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {google.cloud.security.privateca.v1.ISubject} message Subject message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subject.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Subject message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.Subject(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commonName = reader.string(); + break; + case 2: + message.countryCode = reader.string(); + break; + case 3: + message.organization = reader.string(); + break; + case 4: + message.organizationalUnit = reader.string(); + break; + case 5: + message.locality = reader.string(); + break; + case 6: + message.province = reader.string(); + break; + case 7: + message.streetAddress = reader.string(); + break; + case 8: + message.postalCode = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Subject message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.Subject} Subject + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subject.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Subject message. + * @function verify + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Subject.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commonName != null && message.hasOwnProperty("commonName")) + if (!$util.isString(message.commonName)) + return "commonName: string expected"; + if (message.countryCode != null && message.hasOwnProperty("countryCode")) + if (!$util.isString(message.countryCode)) + return "countryCode: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + if (!$util.isString(message.organization)) + return "organization: string expected"; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + if (!$util.isString(message.organizationalUnit)) + return "organizationalUnit: string expected"; + if (message.locality != null && message.hasOwnProperty("locality")) + if (!$util.isString(message.locality)) + return "locality: string expected"; + if (message.province != null && message.hasOwnProperty("province")) + if (!$util.isString(message.province)) + return "province: string expected"; + if (message.streetAddress != null && message.hasOwnProperty("streetAddress")) + if (!$util.isString(message.streetAddress)) + return "streetAddress: string expected"; + if (message.postalCode != null && message.hasOwnProperty("postalCode")) + if (!$util.isString(message.postalCode)) + return "postalCode: string expected"; + return null; + }; + + /** + * Creates a Subject message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.Subject} Subject + */ + Subject.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.Subject) + return object; + var message = new $root.google.cloud.security.privateca.v1.Subject(); + if (object.commonName != null) + message.commonName = String(object.commonName); + if (object.countryCode != null) + message.countryCode = String(object.countryCode); + if (object.organization != null) + message.organization = String(object.organization); + if (object.organizationalUnit != null) + message.organizationalUnit = String(object.organizationalUnit); + if (object.locality != null) + message.locality = String(object.locality); + if (object.province != null) + message.province = String(object.province); + if (object.streetAddress != null) + message.streetAddress = String(object.streetAddress); + if (object.postalCode != null) + message.postalCode = String(object.postalCode); + return message; + }; + + /** + * Creates a plain object from a Subject message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {google.cloud.security.privateca.v1.Subject} message Subject + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Subject.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commonName = ""; + object.countryCode = ""; + object.organization = ""; + object.organizationalUnit = ""; + object.locality = ""; + object.province = ""; + object.streetAddress = ""; + object.postalCode = ""; + } + if (message.commonName != null && message.hasOwnProperty("commonName")) + object.commonName = message.commonName; + if (message.countryCode != null && message.hasOwnProperty("countryCode")) + object.countryCode = message.countryCode; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = message.organization; + if (message.organizationalUnit != null && message.hasOwnProperty("organizationalUnit")) + object.organizationalUnit = message.organizationalUnit; + if (message.locality != null && message.hasOwnProperty("locality")) + object.locality = message.locality; + if (message.province != null && message.hasOwnProperty("province")) + object.province = message.province; + if (message.streetAddress != null && message.hasOwnProperty("streetAddress")) + object.streetAddress = message.streetAddress; + if (message.postalCode != null && message.hasOwnProperty("postalCode")) + object.postalCode = message.postalCode; + return object; + }; + + /** + * Converts this Subject to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.Subject + * @instance + * @returns {Object.} JSON object + */ + Subject.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Subject; + })(); + + v1.SubjectAltNames = (function() { + + /** + * Properties of a SubjectAltNames. + * @memberof google.cloud.security.privateca.v1 + * @interface ISubjectAltNames + * @property {Array.|null} [dnsNames] SubjectAltNames dnsNames + * @property {Array.|null} [uris] SubjectAltNames uris + * @property {Array.|null} [emailAddresses] SubjectAltNames emailAddresses + * @property {Array.|null} [ipAddresses] SubjectAltNames ipAddresses + * @property {Array.|null} [customSans] SubjectAltNames customSans + */ + + /** + * Constructs a new SubjectAltNames. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a SubjectAltNames. + * @implements ISubjectAltNames + * @constructor + * @param {google.cloud.security.privateca.v1.ISubjectAltNames=} [properties] Properties to set + */ + function SubjectAltNames(properties) { + this.dnsNames = []; + this.uris = []; + this.emailAddresses = []; + this.ipAddresses = []; + this.customSans = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SubjectAltNames dnsNames. + * @member {Array.} dnsNames + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.dnsNames = $util.emptyArray; + + /** + * SubjectAltNames uris. + * @member {Array.} uris + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.uris = $util.emptyArray; + + /** + * SubjectAltNames emailAddresses. + * @member {Array.} emailAddresses + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.emailAddresses = $util.emptyArray; + + /** + * SubjectAltNames ipAddresses. + * @member {Array.} ipAddresses + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.ipAddresses = $util.emptyArray; + + /** + * SubjectAltNames customSans. + * @member {Array.} customSans + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @instance + */ + SubjectAltNames.prototype.customSans = $util.emptyArray; + + /** + * Creates a new SubjectAltNames instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1.ISubjectAltNames=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.SubjectAltNames} SubjectAltNames instance + */ + SubjectAltNames.create = function create(properties) { + return new SubjectAltNames(properties); + }; + + /** + * Encodes the specified SubjectAltNames message. Does not implicitly {@link google.cloud.security.privateca.v1.SubjectAltNames.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1.ISubjectAltNames} message SubjectAltNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectAltNames.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dnsNames != null && message.dnsNames.length) + for (var i = 0; i < message.dnsNames.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dnsNames[i]); + if (message.uris != null && message.uris.length) + for (var i = 0; i < message.uris.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uris[i]); + if (message.emailAddresses != null && message.emailAddresses.length) + for (var i = 0; i < message.emailAddresses.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.emailAddresses[i]); + if (message.ipAddresses != null && message.ipAddresses.length) + for (var i = 0; i < message.ipAddresses.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ipAddresses[i]); + if (message.customSans != null && message.customSans.length) + for (var i = 0; i < message.customSans.length; ++i) + $root.google.cloud.security.privateca.v1.X509Extension.encode(message.customSans[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SubjectAltNames message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.SubjectAltNames.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1.ISubjectAltNames} message SubjectAltNames message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SubjectAltNames.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.SubjectAltNames} SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectAltNames.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.SubjectAltNames(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.dnsNames && message.dnsNames.length)) + message.dnsNames = []; + message.dnsNames.push(reader.string()); + break; + case 2: + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + case 3: + if (!(message.emailAddresses && message.emailAddresses.length)) + message.emailAddresses = []; + message.emailAddresses.push(reader.string()); + break; + case 4: + if (!(message.ipAddresses && message.ipAddresses.length)) + message.ipAddresses = []; + message.ipAddresses.push(reader.string()); + break; + case 5: + if (!(message.customSans && message.customSans.length)) + message.customSans = []; + message.customSans.push($root.google.cloud.security.privateca.v1.X509Extension.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SubjectAltNames message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.SubjectAltNames} SubjectAltNames + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SubjectAltNames.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SubjectAltNames message. + * @function verify + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SubjectAltNames.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dnsNames != null && message.hasOwnProperty("dnsNames")) { + if (!Array.isArray(message.dnsNames)) + return "dnsNames: array expected"; + for (var i = 0; i < message.dnsNames.length; ++i) + if (!$util.isString(message.dnsNames[i])) + return "dnsNames: string[] expected"; + } + if (message.uris != null && message.hasOwnProperty("uris")) { + if (!Array.isArray(message.uris)) + return "uris: array expected"; + for (var i = 0; i < message.uris.length; ++i) + if (!$util.isString(message.uris[i])) + return "uris: string[] expected"; + } + if (message.emailAddresses != null && message.hasOwnProperty("emailAddresses")) { + if (!Array.isArray(message.emailAddresses)) + return "emailAddresses: array expected"; + for (var i = 0; i < message.emailAddresses.length; ++i) + if (!$util.isString(message.emailAddresses[i])) + return "emailAddresses: string[] expected"; + } + if (message.ipAddresses != null && message.hasOwnProperty("ipAddresses")) { + if (!Array.isArray(message.ipAddresses)) + return "ipAddresses: array expected"; + for (var i = 0; i < message.ipAddresses.length; ++i) + if (!$util.isString(message.ipAddresses[i])) + return "ipAddresses: string[] expected"; + } + if (message.customSans != null && message.hasOwnProperty("customSans")) { + if (!Array.isArray(message.customSans)) + return "customSans: array expected"; + for (var i = 0; i < message.customSans.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.X509Extension.verify(message.customSans[i]); + if (error) + return "customSans." + error; + } + } + return null; + }; + + /** + * Creates a SubjectAltNames message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.SubjectAltNames} SubjectAltNames + */ + SubjectAltNames.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.SubjectAltNames) + return object; + var message = new $root.google.cloud.security.privateca.v1.SubjectAltNames(); + if (object.dnsNames) { + if (!Array.isArray(object.dnsNames)) + throw TypeError(".google.cloud.security.privateca.v1.SubjectAltNames.dnsNames: array expected"); + message.dnsNames = []; + for (var i = 0; i < object.dnsNames.length; ++i) + message.dnsNames[i] = String(object.dnsNames[i]); + } + if (object.uris) { + if (!Array.isArray(object.uris)) + throw TypeError(".google.cloud.security.privateca.v1.SubjectAltNames.uris: array expected"); + message.uris = []; + for (var i = 0; i < object.uris.length; ++i) + message.uris[i] = String(object.uris[i]); + } + if (object.emailAddresses) { + if (!Array.isArray(object.emailAddresses)) + throw TypeError(".google.cloud.security.privateca.v1.SubjectAltNames.emailAddresses: array expected"); + message.emailAddresses = []; + for (var i = 0; i < object.emailAddresses.length; ++i) + message.emailAddresses[i] = String(object.emailAddresses[i]); + } + if (object.ipAddresses) { + if (!Array.isArray(object.ipAddresses)) + throw TypeError(".google.cloud.security.privateca.v1.SubjectAltNames.ipAddresses: array expected"); + message.ipAddresses = []; + for (var i = 0; i < object.ipAddresses.length; ++i) + message.ipAddresses[i] = String(object.ipAddresses[i]); + } + if (object.customSans) { + if (!Array.isArray(object.customSans)) + throw TypeError(".google.cloud.security.privateca.v1.SubjectAltNames.customSans: array expected"); + message.customSans = []; + for (var i = 0; i < object.customSans.length; ++i) { + if (typeof object.customSans[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.SubjectAltNames.customSans: object expected"); + message.customSans[i] = $root.google.cloud.security.privateca.v1.X509Extension.fromObject(object.customSans[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SubjectAltNames message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {google.cloud.security.privateca.v1.SubjectAltNames} message SubjectAltNames + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SubjectAltNames.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dnsNames = []; + object.uris = []; + object.emailAddresses = []; + object.ipAddresses = []; + object.customSans = []; + } + if (message.dnsNames && message.dnsNames.length) { + object.dnsNames = []; + for (var j = 0; j < message.dnsNames.length; ++j) + object.dnsNames[j] = message.dnsNames[j]; + } + if (message.uris && message.uris.length) { + object.uris = []; + for (var j = 0; j < message.uris.length; ++j) + object.uris[j] = message.uris[j]; + } + if (message.emailAddresses && message.emailAddresses.length) { + object.emailAddresses = []; + for (var j = 0; j < message.emailAddresses.length; ++j) + object.emailAddresses[j] = message.emailAddresses[j]; + } + if (message.ipAddresses && message.ipAddresses.length) { + object.ipAddresses = []; + for (var j = 0; j < message.ipAddresses.length; ++j) + object.ipAddresses[j] = message.ipAddresses[j]; + } + if (message.customSans && message.customSans.length) { + object.customSans = []; + for (var j = 0; j < message.customSans.length; ++j) + object.customSans[j] = $root.google.cloud.security.privateca.v1.X509Extension.toObject(message.customSans[j], options); + } + return object; + }; + + /** + * Converts this SubjectAltNames to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @instance + * @returns {Object.} JSON object + */ + SubjectAltNames.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SubjectAltNames; + })(); + + v1.CertificateIdentityConstraints = (function() { + + /** + * Properties of a CertificateIdentityConstraints. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificateIdentityConstraints + * @property {google.type.IExpr|null} [celExpression] CertificateIdentityConstraints celExpression + * @property {boolean|null} [allowSubjectPassthrough] CertificateIdentityConstraints allowSubjectPassthrough + * @property {boolean|null} [allowSubjectAltNamesPassthrough] CertificateIdentityConstraints allowSubjectAltNamesPassthrough + */ + + /** + * Constructs a new CertificateIdentityConstraints. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateIdentityConstraints. + * @implements ICertificateIdentityConstraints + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificateIdentityConstraints=} [properties] Properties to set + */ + function CertificateIdentityConstraints(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateIdentityConstraints celExpression. + * @member {google.type.IExpr|null|undefined} celExpression + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @instance + */ + CertificateIdentityConstraints.prototype.celExpression = null; + + /** + * CertificateIdentityConstraints allowSubjectPassthrough. + * @member {boolean} allowSubjectPassthrough + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @instance + */ + CertificateIdentityConstraints.prototype.allowSubjectPassthrough = false; + + /** + * CertificateIdentityConstraints allowSubjectAltNamesPassthrough. + * @member {boolean} allowSubjectAltNamesPassthrough + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @instance + */ + CertificateIdentityConstraints.prototype.allowSubjectAltNamesPassthrough = false; + + /** + * Creates a new CertificateIdentityConstraints instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {google.cloud.security.privateca.v1.ICertificateIdentityConstraints=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateIdentityConstraints} CertificateIdentityConstraints instance + */ + CertificateIdentityConstraints.create = function create(properties) { + return new CertificateIdentityConstraints(properties); + }; + + /** + * Encodes the specified CertificateIdentityConstraints message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateIdentityConstraints.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {google.cloud.security.privateca.v1.ICertificateIdentityConstraints} message CertificateIdentityConstraints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateIdentityConstraints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.celExpression != null && Object.hasOwnProperty.call(message, "celExpression")) + $root.google.type.Expr.encode(message.celExpression, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.allowSubjectPassthrough != null && Object.hasOwnProperty.call(message, "allowSubjectPassthrough")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowSubjectPassthrough); + if (message.allowSubjectAltNamesPassthrough != null && Object.hasOwnProperty.call(message, "allowSubjectAltNamesPassthrough")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowSubjectAltNamesPassthrough); + return writer; + }; + + /** + * Encodes the specified CertificateIdentityConstraints message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateIdentityConstraints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {google.cloud.security.privateca.v1.ICertificateIdentityConstraints} message CertificateIdentityConstraints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateIdentityConstraints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateIdentityConstraints message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateIdentityConstraints} CertificateIdentityConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateIdentityConstraints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.celExpression = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + case 2: + message.allowSubjectPassthrough = reader.bool(); + break; + case 3: + message.allowSubjectAltNamesPassthrough = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateIdentityConstraints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateIdentityConstraints} CertificateIdentityConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateIdentityConstraints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateIdentityConstraints message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateIdentityConstraints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.celExpression != null && message.hasOwnProperty("celExpression")) { + var error = $root.google.type.Expr.verify(message.celExpression); + if (error) + return "celExpression." + error; + } + if (message.allowSubjectPassthrough != null && message.hasOwnProperty("allowSubjectPassthrough")) + if (typeof message.allowSubjectPassthrough !== "boolean") + return "allowSubjectPassthrough: boolean expected"; + if (message.allowSubjectAltNamesPassthrough != null && message.hasOwnProperty("allowSubjectAltNamesPassthrough")) + if (typeof message.allowSubjectAltNamesPassthrough !== "boolean") + return "allowSubjectAltNamesPassthrough: boolean expected"; + return null; + }; + + /** + * Creates a CertificateIdentityConstraints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateIdentityConstraints} CertificateIdentityConstraints + */ + CertificateIdentityConstraints.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints(); + if (object.celExpression != null) { + if (typeof object.celExpression !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateIdentityConstraints.celExpression: object expected"); + message.celExpression = $root.google.type.Expr.fromObject(object.celExpression); + } + if (object.allowSubjectPassthrough != null) + message.allowSubjectPassthrough = Boolean(object.allowSubjectPassthrough); + if (object.allowSubjectAltNamesPassthrough != null) + message.allowSubjectAltNamesPassthrough = Boolean(object.allowSubjectAltNamesPassthrough); + return message; + }; + + /** + * Creates a plain object from a CertificateIdentityConstraints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {google.cloud.security.privateca.v1.CertificateIdentityConstraints} message CertificateIdentityConstraints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateIdentityConstraints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.celExpression = null; + object.allowSubjectPassthrough = false; + object.allowSubjectAltNamesPassthrough = false; + } + if (message.celExpression != null && message.hasOwnProperty("celExpression")) + object.celExpression = $root.google.type.Expr.toObject(message.celExpression, options); + if (message.allowSubjectPassthrough != null && message.hasOwnProperty("allowSubjectPassthrough")) + object.allowSubjectPassthrough = message.allowSubjectPassthrough; + if (message.allowSubjectAltNamesPassthrough != null && message.hasOwnProperty("allowSubjectAltNamesPassthrough")) + object.allowSubjectAltNamesPassthrough = message.allowSubjectAltNamesPassthrough; + return object; + }; + + /** + * Converts this CertificateIdentityConstraints to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @instance + * @returns {Object.} JSON object + */ + CertificateIdentityConstraints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertificateIdentityConstraints; + })(); + + v1.CertificateExtensionConstraints = (function() { + + /** + * Properties of a CertificateExtensionConstraints. + * @memberof google.cloud.security.privateca.v1 + * @interface ICertificateExtensionConstraints + * @property {Array.|null} [knownExtensions] CertificateExtensionConstraints knownExtensions + * @property {Array.|null} [additionalExtensions] CertificateExtensionConstraints additionalExtensions + */ + + /** + * Constructs a new CertificateExtensionConstraints. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateExtensionConstraints. + * @implements ICertificateExtensionConstraints + * @constructor + * @param {google.cloud.security.privateca.v1.ICertificateExtensionConstraints=} [properties] Properties to set + */ + function CertificateExtensionConstraints(properties) { + this.knownExtensions = []; + this.additionalExtensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateExtensionConstraints knownExtensions. + * @member {Array.} knownExtensions + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @instance + */ + CertificateExtensionConstraints.prototype.knownExtensions = $util.emptyArray; + + /** + * CertificateExtensionConstraints additionalExtensions. + * @member {Array.} additionalExtensions + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @instance + */ + CertificateExtensionConstraints.prototype.additionalExtensions = $util.emptyArray; + + /** + * Creates a new CertificateExtensionConstraints instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {google.cloud.security.privateca.v1.ICertificateExtensionConstraints=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CertificateExtensionConstraints} CertificateExtensionConstraints instance + */ + CertificateExtensionConstraints.create = function create(properties) { + return new CertificateExtensionConstraints(properties); + }; + + /** + * Encodes the specified CertificateExtensionConstraints message. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateExtensionConstraints.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {google.cloud.security.privateca.v1.ICertificateExtensionConstraints} message CertificateExtensionConstraints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateExtensionConstraints.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.knownExtensions != null && message.knownExtensions.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.knownExtensions.length; ++i) + writer.int32(message.knownExtensions[i]); + writer.ldelim(); + } + if (message.additionalExtensions != null && message.additionalExtensions.length) + for (var i = 0; i < message.additionalExtensions.length; ++i) + $root.google.cloud.security.privateca.v1.ObjectId.encode(message.additionalExtensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateExtensionConstraints message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CertificateExtensionConstraints.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {google.cloud.security.privateca.v1.ICertificateExtensionConstraints} message CertificateExtensionConstraints message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateExtensionConstraints.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateExtensionConstraints message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CertificateExtensionConstraints} CertificateExtensionConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateExtensionConstraints.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.knownExtensions && message.knownExtensions.length)) + message.knownExtensions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.knownExtensions.push(reader.int32()); + } else + message.knownExtensions.push(reader.int32()); + break; + case 2: + if (!(message.additionalExtensions && message.additionalExtensions.length)) + message.additionalExtensions = []; + message.additionalExtensions.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertificateExtensionConstraints message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CertificateExtensionConstraints} CertificateExtensionConstraints + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateExtensionConstraints.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateExtensionConstraints message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateExtensionConstraints.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.knownExtensions != null && message.hasOwnProperty("knownExtensions")) { + if (!Array.isArray(message.knownExtensions)) + return "knownExtensions: array expected"; + for (var i = 0; i < message.knownExtensions.length; ++i) + switch (message.knownExtensions[i]) { + default: + return "knownExtensions: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.additionalExtensions != null && message.hasOwnProperty("additionalExtensions")) { + if (!Array.isArray(message.additionalExtensions)) + return "additionalExtensions: array expected"; + for (var i = 0; i < message.additionalExtensions.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.ObjectId.verify(message.additionalExtensions[i]); + if (error) + return "additionalExtensions." + error; + } + } + return null; + }; + + /** + * Creates a CertificateExtensionConstraints message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CertificateExtensionConstraints} CertificateExtensionConstraints + */ + CertificateExtensionConstraints.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints) + return object; + var message = new $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints(); + if (object.knownExtensions) { + if (!Array.isArray(object.knownExtensions)) + throw TypeError(".google.cloud.security.privateca.v1.CertificateExtensionConstraints.knownExtensions: array expected"); + message.knownExtensions = []; + for (var i = 0; i < object.knownExtensions.length; ++i) + switch (object.knownExtensions[i]) { + default: + case "KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED": + case 0: + message.knownExtensions[i] = 0; + break; + case "BASE_KEY_USAGE": + case 1: + message.knownExtensions[i] = 1; + break; + case "EXTENDED_KEY_USAGE": + case 2: + message.knownExtensions[i] = 2; + break; + case "CA_OPTIONS": + case 3: + message.knownExtensions[i] = 3; + break; + case "POLICY_IDS": + case 4: + message.knownExtensions[i] = 4; + break; + case "AIA_OCSP_SERVERS": + case 5: + message.knownExtensions[i] = 5; + break; + } + } + if (object.additionalExtensions) { + if (!Array.isArray(object.additionalExtensions)) + throw TypeError(".google.cloud.security.privateca.v1.CertificateExtensionConstraints.additionalExtensions: array expected"); + message.additionalExtensions = []; + for (var i = 0; i < object.additionalExtensions.length; ++i) { + if (typeof object.additionalExtensions[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CertificateExtensionConstraints.additionalExtensions: object expected"); + message.additionalExtensions[i] = $root.google.cloud.security.privateca.v1.ObjectId.fromObject(object.additionalExtensions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CertificateExtensionConstraints message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {google.cloud.security.privateca.v1.CertificateExtensionConstraints} message CertificateExtensionConstraints + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateExtensionConstraints.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.knownExtensions = []; + object.additionalExtensions = []; + } + if (message.knownExtensions && message.knownExtensions.length) { + object.knownExtensions = []; + for (var j = 0; j < message.knownExtensions.length; ++j) + object.knownExtensions[j] = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension[message.knownExtensions[j]] : message.knownExtensions[j]; + } + if (message.additionalExtensions && message.additionalExtensions.length) { + object.additionalExtensions = []; + for (var j = 0; j < message.additionalExtensions.length; ++j) + object.additionalExtensions[j] = $root.google.cloud.security.privateca.v1.ObjectId.toObject(message.additionalExtensions[j], options); + } + return object; + }; + + /** + * Converts this CertificateExtensionConstraints to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @instance + * @returns {Object.} JSON object + */ + CertificateExtensionConstraints.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * KnownCertificateExtension enum. + * @name google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension + * @enum {number} + * @property {number} KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED=0 KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED value + * @property {number} BASE_KEY_USAGE=1 BASE_KEY_USAGE value + * @property {number} EXTENDED_KEY_USAGE=2 EXTENDED_KEY_USAGE value + * @property {number} CA_OPTIONS=3 CA_OPTIONS value + * @property {number} POLICY_IDS=4 POLICY_IDS value + * @property {number} AIA_OCSP_SERVERS=5 AIA_OCSP_SERVERS value + */ + CertificateExtensionConstraints.KnownCertificateExtension = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASE_KEY_USAGE"] = 1; + values[valuesById[2] = "EXTENDED_KEY_USAGE"] = 2; + values[valuesById[3] = "CA_OPTIONS"] = 3; + values[valuesById[4] = "POLICY_IDS"] = 4; + values[valuesById[5] = "AIA_OCSP_SERVERS"] = 5; + return values; + })(); + + return CertificateExtensionConstraints; + })(); + + /** + * RevocationReason enum. + * @name google.cloud.security.privateca.v1.RevocationReason + * @enum {number} + * @property {number} REVOCATION_REASON_UNSPECIFIED=0 REVOCATION_REASON_UNSPECIFIED value + * @property {number} KEY_COMPROMISE=1 KEY_COMPROMISE value + * @property {number} CERTIFICATE_AUTHORITY_COMPROMISE=2 CERTIFICATE_AUTHORITY_COMPROMISE value + * @property {number} AFFILIATION_CHANGED=3 AFFILIATION_CHANGED value + * @property {number} SUPERSEDED=4 SUPERSEDED value + * @property {number} CESSATION_OF_OPERATION=5 CESSATION_OF_OPERATION value + * @property {number} CERTIFICATE_HOLD=6 CERTIFICATE_HOLD value + * @property {number} PRIVILEGE_WITHDRAWN=7 PRIVILEGE_WITHDRAWN value + * @property {number} ATTRIBUTE_AUTHORITY_COMPROMISE=8 ATTRIBUTE_AUTHORITY_COMPROMISE value + */ + v1.RevocationReason = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REVOCATION_REASON_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEY_COMPROMISE"] = 1; + values[valuesById[2] = "CERTIFICATE_AUTHORITY_COMPROMISE"] = 2; + values[valuesById[3] = "AFFILIATION_CHANGED"] = 3; + values[valuesById[4] = "SUPERSEDED"] = 4; + values[valuesById[5] = "CESSATION_OF_OPERATION"] = 5; + values[valuesById[6] = "CERTIFICATE_HOLD"] = 6; + values[valuesById[7] = "PRIVILEGE_WITHDRAWN"] = 7; + values[valuesById[8] = "ATTRIBUTE_AUTHORITY_COMPROMISE"] = 8; + return values; + })(); + + /** + * SubjectRequestMode enum. + * @name google.cloud.security.privateca.v1.SubjectRequestMode + * @enum {number} + * @property {number} SUBJECT_REQUEST_MODE_UNSPECIFIED=0 SUBJECT_REQUEST_MODE_UNSPECIFIED value + * @property {number} DEFAULT=1 DEFAULT value + * @property {number} REFLECTED_SPIFFE=2 REFLECTED_SPIFFE value + */ + v1.SubjectRequestMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUBJECT_REQUEST_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DEFAULT"] = 1; + values[valuesById[2] = "REFLECTED_SPIFFE"] = 2; + return values; + })(); + + v1.CertificateAuthorityService = (function() { + + /** + * Constructs a new CertificateAuthorityService service. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CertificateAuthorityService + * @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 CertificateAuthorityService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (CertificateAuthorityService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = CertificateAuthorityService; + + /** + * Creates new CertificateAuthorityService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @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 {CertificateAuthorityService} RPC service. Useful where requests and/or responses are streamed. + */ + CertificateAuthorityService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef CreateCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.Certificate} [response] Certificate + */ + + /** + * Calls CreateCertificate. + * @function createCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCertificateRequest} request CreateCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCertificate = function createCertificate(request, callback) { + return this.rpcCall(createCertificate, $root.google.cloud.security.privateca.v1.CreateCertificateRequest, $root.google.cloud.security.privateca.v1.Certificate, request, callback); + }, "name", { value: "CreateCertificate" }); + + /** + * Calls CreateCertificate. + * @function createCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCertificateRequest} request CreateCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef GetCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.Certificate} [response] Certificate + */ + + /** + * Calls GetCertificate. + * @function getCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateRequest} request GetCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificate = function getCertificate(request, callback) { + return this.rpcCall(getCertificate, $root.google.cloud.security.privateca.v1.GetCertificateRequest, $root.google.cloud.security.privateca.v1.Certificate, request, callback); + }, "name", { value: "GetCertificate" }); + + /** + * Calls GetCertificate. + * @function getCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateRequest} request GetCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificates}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef ListCertificatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.ListCertificatesResponse} [response] ListCertificatesResponse + */ + + /** + * Calls ListCertificates. + * @function listCertificates + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificatesRequest} request ListCertificatesRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificatesCallback} callback Node-style callback called with the error, if any, and ListCertificatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificates = function listCertificates(request, callback) { + return this.rpcCall(listCertificates, $root.google.cloud.security.privateca.v1.ListCertificatesRequest, $root.google.cloud.security.privateca.v1.ListCertificatesResponse, request, callback); + }, "name", { value: "ListCertificates" }); + + /** + * Calls ListCertificates. + * @function listCertificates + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificatesRequest} request ListCertificatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#revokeCertificate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef RevokeCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.Certificate} [response] Certificate + */ + + /** + * Calls RevokeCertificate. + * @function revokeCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IRevokeCertificateRequest} request RevokeCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.revokeCertificate = function revokeCertificate(request, callback) { + return this.rpcCall(revokeCertificate, $root.google.cloud.security.privateca.v1.RevokeCertificateRequest, $root.google.cloud.security.privateca.v1.Certificate, request, callback); + }, "name", { value: "RevokeCertificate" }); + + /** + * Calls RevokeCertificate. + * @function revokeCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IRevokeCertificateRequest} request RevokeCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef UpdateCertificateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.Certificate} [response] Certificate + */ + + /** + * Calls UpdateCertificate. + * @function updateCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRequest} request UpdateCertificateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateCallback} callback Node-style callback called with the error, if any, and Certificate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificate = function updateCertificate(request, callback) { + return this.rpcCall(updateCertificate, $root.google.cloud.security.privateca.v1.UpdateCertificateRequest, $root.google.cloud.security.privateca.v1.Certificate, request, callback); + }, "name", { value: "UpdateCertificate" }); + + /** + * Calls UpdateCertificate. + * @function updateCertificate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRequest} request UpdateCertificateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#activateCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef ActivateCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ActivateCertificateAuthority. + * @function activateCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest} request ActivateCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.activateCertificateAuthority = function activateCertificateAuthority(request, callback) { + return this.rpcCall(activateCertificateAuthority, $root.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ActivateCertificateAuthority" }); + + /** + * Calls ActivateCertificateAuthority. + * @function activateCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest} request ActivateCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef CreateCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCertificateAuthority. + * @function createCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest} request CreateCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCertificateAuthority = function createCertificateAuthority(request, callback) { + return this.rpcCall(createCertificateAuthority, $root.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCertificateAuthority" }); + + /** + * Calls CreateCertificateAuthority. + * @function createCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest} request CreateCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#disableCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef DisableCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DisableCertificateAuthority. + * @function disableCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest} request DisableCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.disableCertificateAuthority = function disableCertificateAuthority(request, callback) { + return this.rpcCall(disableCertificateAuthority, $root.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DisableCertificateAuthority" }); + + /** + * Calls DisableCertificateAuthority. + * @function disableCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest} request DisableCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#enableCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef EnableCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls EnableCertificateAuthority. + * @function enableCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest} request EnableCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.enableCertificateAuthority = function enableCertificateAuthority(request, callback) { + return this.rpcCall(enableCertificateAuthority, $root.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "EnableCertificateAuthority" }); + + /** + * Calls EnableCertificateAuthority. + * @function enableCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest} request EnableCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef FetchCertificateAuthorityCsrCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse} [response] FetchCertificateAuthorityCsrResponse + */ + + /** + * Calls FetchCertificateAuthorityCsr. + * @function fetchCertificateAuthorityCsr + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest} request FetchCertificateAuthorityCsrRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsrCallback} callback Node-style callback called with the error, if any, and FetchCertificateAuthorityCsrResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.fetchCertificateAuthorityCsr = function fetchCertificateAuthorityCsr(request, callback) { + return this.rpcCall(fetchCertificateAuthorityCsr, $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest, $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse, request, callback); + }, "name", { value: "FetchCertificateAuthorityCsr" }); + + /** + * Calls FetchCertificateAuthorityCsr. + * @function fetchCertificateAuthorityCsr + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest} request FetchCertificateAuthorityCsrRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef GetCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.CertificateAuthority} [response] CertificateAuthority + */ + + /** + * Calls GetCertificateAuthority. + * @function getCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest} request GetCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and CertificateAuthority + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificateAuthority = function getCertificateAuthority(request, callback) { + return this.rpcCall(getCertificateAuthority, $root.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest, $root.google.cloud.security.privateca.v1.CertificateAuthority, request, callback); + }, "name", { value: "GetCertificateAuthority" }); + + /** + * Calls GetCertificateAuthority. + * @function getCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest} request GetCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateAuthorities}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef ListCertificateAuthoritiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse} [response] ListCertificateAuthoritiesResponse + */ + + /** + * Calls ListCertificateAuthorities. + * @function listCertificateAuthorities + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest} request ListCertificateAuthoritiesRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthoritiesCallback} callback Node-style callback called with the error, if any, and ListCertificateAuthoritiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificateAuthorities = function listCertificateAuthorities(request, callback) { + return this.rpcCall(listCertificateAuthorities, $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest, $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse, request, callback); + }, "name", { value: "ListCertificateAuthorities" }); + + /** + * Calls ListCertificateAuthorities. + * @function listCertificateAuthorities + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest} request ListCertificateAuthoritiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#undeleteCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef UndeleteCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UndeleteCertificateAuthority. + * @function undeleteCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest} request UndeleteCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.undeleteCertificateAuthority = function undeleteCertificateAuthority(request, callback) { + return this.rpcCall(undeleteCertificateAuthority, $root.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UndeleteCertificateAuthority" }); + + /** + * Calls UndeleteCertificateAuthority. + * @function undeleteCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest} request UndeleteCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef DeleteCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteCertificateAuthority. + * @function deleteCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest} request DeleteCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.deleteCertificateAuthority = function deleteCertificateAuthority(request, callback) { + return this.rpcCall(deleteCertificateAuthority, $root.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteCertificateAuthority" }); + + /** + * Calls DeleteCertificateAuthority. + * @function deleteCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest} request DeleteCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateAuthority}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef UpdateCertificateAuthorityCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCertificateAuthority. + * @function updateCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest} request UpdateCertificateAuthorityRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthorityCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificateAuthority = function updateCertificateAuthority(request, callback) { + return this.rpcCall(updateCertificateAuthority, $root.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCertificateAuthority" }); + + /** + * Calls UpdateCertificateAuthority. + * @function updateCertificateAuthority + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest} request UpdateCertificateAuthorityRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCaPool}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef CreateCaPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCaPool. + * @function createCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCaPoolRequest} request CreateCaPoolRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCaPool = function createCaPool(request, callback) { + return this.rpcCall(createCaPool, $root.google.cloud.security.privateca.v1.CreateCaPoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCaPool" }); + + /** + * Calls CreateCaPool. + * @function createCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCaPoolRequest} request CreateCaPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCaPool}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef UpdateCaPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCaPool. + * @function updateCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCaPoolRequest} request UpdateCaPoolRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCaPool = function updateCaPool(request, callback) { + return this.rpcCall(updateCaPool, $root.google.cloud.security.privateca.v1.UpdateCaPoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCaPool" }); + + /** + * Calls UpdateCaPool. + * @function updateCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCaPoolRequest} request UpdateCaPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCaPool}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef GetCaPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.CaPool} [response] CaPool + */ + + /** + * Calls GetCaPool. + * @function getCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCaPoolRequest} request GetCaPoolRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPoolCallback} callback Node-style callback called with the error, if any, and CaPool + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCaPool = function getCaPool(request, callback) { + return this.rpcCall(getCaPool, $root.google.cloud.security.privateca.v1.GetCaPoolRequest, $root.google.cloud.security.privateca.v1.CaPool, request, callback); + }, "name", { value: "GetCaPool" }); + + /** + * Calls GetCaPool. + * @function getCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCaPoolRequest} request GetCaPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCaPools}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef ListCaPoolsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.ListCaPoolsResponse} [response] ListCaPoolsResponse + */ + + /** + * Calls ListCaPools. + * @function listCaPools + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCaPoolsRequest} request ListCaPoolsRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPoolsCallback} callback Node-style callback called with the error, if any, and ListCaPoolsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCaPools = function listCaPools(request, callback) { + return this.rpcCall(listCaPools, $root.google.cloud.security.privateca.v1.ListCaPoolsRequest, $root.google.cloud.security.privateca.v1.ListCaPoolsResponse, request, callback); + }, "name", { value: "ListCaPools" }); + + /** + * Calls ListCaPools. + * @function listCaPools + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCaPoolsRequest} request ListCaPoolsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCaPool}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef DeleteCaPoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteCaPool. + * @function deleteCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDeleteCaPoolRequest} request DeleteCaPoolRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPoolCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.deleteCaPool = function deleteCaPool(request, callback) { + return this.rpcCall(deleteCaPool, $root.google.cloud.security.privateca.v1.DeleteCaPoolRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteCaPool" }); + + /** + * Calls DeleteCaPool. + * @function deleteCaPool + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDeleteCaPoolRequest} request DeleteCaPoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCaCerts}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef FetchCaCertsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse} [response] FetchCaCertsResponse + */ + + /** + * Calls FetchCaCerts. + * @function fetchCaCerts + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IFetchCaCertsRequest} request FetchCaCertsRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCertsCallback} callback Node-style callback called with the error, if any, and FetchCaCertsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.fetchCaCerts = function fetchCaCerts(request, callback) { + return this.rpcCall(fetchCaCerts, $root.google.cloud.security.privateca.v1.FetchCaCertsRequest, $root.google.cloud.security.privateca.v1.FetchCaCertsResponse, request, callback); + }, "name", { value: "FetchCaCerts" }); + + /** + * Calls FetchCaCerts. + * @function fetchCaCerts + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IFetchCaCertsRequest} request FetchCaCertsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateRevocationList}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef GetCertificateRevocationListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.CertificateRevocationList} [response] CertificateRevocationList + */ + + /** + * Calls GetCertificateRevocationList. + * @function getCertificateRevocationList + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest} request GetCertificateRevocationListRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationListCallback} callback Node-style callback called with the error, if any, and CertificateRevocationList + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificateRevocationList = function getCertificateRevocationList(request, callback) { + return this.rpcCall(getCertificateRevocationList, $root.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest, $root.google.cloud.security.privateca.v1.CertificateRevocationList, request, callback); + }, "name", { value: "GetCertificateRevocationList" }); + + /** + * Calls GetCertificateRevocationList. + * @function getCertificateRevocationList + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest} request GetCertificateRevocationListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateRevocationLists}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef ListCertificateRevocationListsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse} [response] ListCertificateRevocationListsResponse + */ + + /** + * Calls ListCertificateRevocationLists. + * @function listCertificateRevocationLists + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest} request ListCertificateRevocationListsRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationListsCallback} callback Node-style callback called with the error, if any, and ListCertificateRevocationListsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificateRevocationLists = function listCertificateRevocationLists(request, callback) { + return this.rpcCall(listCertificateRevocationLists, $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest, $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse, request, callback); + }, "name", { value: "ListCertificateRevocationLists" }); + + /** + * Calls ListCertificateRevocationLists. + * @function listCertificateRevocationLists + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest} request ListCertificateRevocationListsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateRevocationList}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef UpdateCertificateRevocationListCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCertificateRevocationList. + * @function updateCertificateRevocationList + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest} request UpdateCertificateRevocationListRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationListCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificateRevocationList = function updateCertificateRevocationList(request, callback) { + return this.rpcCall(updateCertificateRevocationList, $root.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCertificateRevocationList" }); + + /** + * Calls UpdateCertificateRevocationList. + * @function updateCertificateRevocationList + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest} request UpdateCertificateRevocationListRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateTemplate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef CreateCertificateTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateCertificateTemplate. + * @function createCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest} request CreateCertificateTemplateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplateCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.createCertificateTemplate = function createCertificateTemplate(request, callback) { + return this.rpcCall(createCertificateTemplate, $root.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateCertificateTemplate" }); + + /** + * Calls CreateCertificateTemplate. + * @function createCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest} request CreateCertificateTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateTemplate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef DeleteCertificateTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteCertificateTemplate. + * @function deleteCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest} request DeleteCertificateTemplateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplateCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.deleteCertificateTemplate = function deleteCertificateTemplate(request, callback) { + return this.rpcCall(deleteCertificateTemplate, $root.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteCertificateTemplate" }); + + /** + * Calls DeleteCertificateTemplate. + * @function deleteCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest} request DeleteCertificateTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateTemplate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef GetCertificateTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.CertificateTemplate} [response] CertificateTemplate + */ + + /** + * Calls GetCertificateTemplate. + * @function getCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateTemplateRequest} request GetCertificateTemplateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplateCallback} callback Node-style callback called with the error, if any, and CertificateTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.getCertificateTemplate = function getCertificateTemplate(request, callback) { + return this.rpcCall(getCertificateTemplate, $root.google.cloud.security.privateca.v1.GetCertificateTemplateRequest, $root.google.cloud.security.privateca.v1.CertificateTemplate, request, callback); + }, "name", { value: "GetCertificateTemplate" }); + + /** + * Calls GetCertificateTemplate. + * @function getCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IGetCertificateTemplateRequest} request GetCertificateTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateTemplates}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef ListCertificateTemplatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.security.privateca.v1.ListCertificateTemplatesResponse} [response] ListCertificateTemplatesResponse + */ + + /** + * Calls ListCertificateTemplates. + * @function listCertificateTemplates + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesRequest} request ListCertificateTemplatesRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplatesCallback} callback Node-style callback called with the error, if any, and ListCertificateTemplatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.listCertificateTemplates = function listCertificateTemplates(request, callback) { + return this.rpcCall(listCertificateTemplates, $root.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest, $root.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse, request, callback); + }, "name", { value: "ListCertificateTemplates" }); + + /** + * Calls ListCertificateTemplates. + * @function listCertificateTemplates + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesRequest} request ListCertificateTemplatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateTemplate}. + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @typedef UpdateCertificateTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateCertificateTemplate. + * @function updateCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest} request UpdateCertificateTemplateRequest message or plain object + * @param {google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplateCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(CertificateAuthorityService.prototype.updateCertificateTemplate = function updateCertificateTemplate(request, callback) { + return this.rpcCall(updateCertificateTemplate, $root.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateCertificateTemplate" }); + + /** + * Calls UpdateCertificateTemplate. + * @function updateCertificateTemplate + * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService + * @instance + * @param {google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest} request UpdateCertificateTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return CertificateAuthorityService; + })(); + + v1.CreateCertificateRequest = (function() { + + /** + * Properties of a CreateCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface ICreateCertificateRequest + * @property {string|null} [parent] CreateCertificateRequest parent + * @property {string|null} [certificateId] CreateCertificateRequest certificateId + * @property {google.cloud.security.privateca.v1.ICertificate|null} [certificate] CreateCertificateRequest certificate + * @property {string|null} [requestId] CreateCertificateRequest requestId + * @property {boolean|null} [validateOnly] CreateCertificateRequest validateOnly + * @property {string|null} [issuingCertificateAuthorityId] CreateCertificateRequest issuingCertificateAuthorityId + */ + + /** + * Constructs a new CreateCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CreateCertificateRequest. + * @implements ICreateCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.ICreateCertificateRequest=} [properties] Properties to set + */ + function CreateCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCertificateRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.parent = ""; + + /** + * CreateCertificateRequest certificateId. + * @member {string} certificateId + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.certificateId = ""; + + /** + * CreateCertificateRequest certificate. + * @member {google.cloud.security.privateca.v1.ICertificate|null|undefined} certificate + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.certificate = null; + + /** + * CreateCertificateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.requestId = ""; + + /** + * CreateCertificateRequest validateOnly. + * @member {boolean} validateOnly + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.validateOnly = false; + + /** + * CreateCertificateRequest issuingCertificateAuthorityId. + * @member {string} issuingCertificateAuthorityId + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + */ + CreateCertificateRequest.prototype.issuingCertificateAuthorityId = ""; + + /** + * Creates a new CreateCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CreateCertificateRequest} CreateCertificateRequest instance + */ + CreateCertificateRequest.create = function create(properties) { + return new CreateCertificateRequest(properties); + }; + + /** + * Encodes the specified CreateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateRequest} message CreateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateRequest.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.certificateId != null && Object.hasOwnProperty.call(message, "certificateId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateId); + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) + $root.google.cloud.security.privateca.v1.Certificate.encode(message.certificate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.validateOnly != null && Object.hasOwnProperty.call(message, "validateOnly")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.validateOnly); + if (message.issuingCertificateAuthorityId != null && Object.hasOwnProperty.call(message, "issuingCertificateAuthorityId")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.issuingCertificateAuthorityId); + return writer; + }; + + /** + * Encodes the specified CreateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateRequest} message CreateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CreateCertificateRequest} CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CreateCertificateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.certificateId = reader.string(); + break; + case 3: + message.certificate = $root.google.cloud.security.privateca.v1.Certificate.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + case 5: + message.validateOnly = reader.bool(); + break; + case 6: + message.issuingCertificateAuthorityId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CreateCertificateRequest} CreateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCertificateRequest.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.certificateId != null && message.hasOwnProperty("certificateId")) + if (!$util.isString(message.certificateId)) + return "certificateId: string expected"; + if (message.certificate != null && message.hasOwnProperty("certificate")) { + var error = $root.google.cloud.security.privateca.v1.Certificate.verify(message.certificate); + if (error) + return "certificate." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + if (typeof message.validateOnly !== "boolean") + return "validateOnly: boolean expected"; + if (message.issuingCertificateAuthorityId != null && message.hasOwnProperty("issuingCertificateAuthorityId")) + if (!$util.isString(message.issuingCertificateAuthorityId)) + return "issuingCertificateAuthorityId: string expected"; + return null; + }; + + /** + * Creates a CreateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CreateCertificateRequest} CreateCertificateRequest + */ + CreateCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CreateCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.CreateCertificateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.certificateId != null) + message.certificateId = String(object.certificateId); + if (object.certificate != null) { + if (typeof object.certificate !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CreateCertificateRequest.certificate: object expected"); + message.certificate = $root.google.cloud.security.privateca.v1.Certificate.fromObject(object.certificate); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.validateOnly != null) + message.validateOnly = Boolean(object.validateOnly); + if (object.issuingCertificateAuthorityId != null) + message.issuingCertificateAuthorityId = String(object.issuingCertificateAuthorityId); + return message; + }; + + /** + * Creates a plain object from a CreateCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.CreateCertificateRequest} message CreateCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCertificateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.certificateId = ""; + object.certificate = null; + object.requestId = ""; + object.validateOnly = false; + object.issuingCertificateAuthorityId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.certificateId != null && message.hasOwnProperty("certificateId")) + object.certificateId = message.certificateId; + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = $root.google.cloud.security.privateca.v1.Certificate.toObject(message.certificate, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.validateOnly != null && message.hasOwnProperty("validateOnly")) + object.validateOnly = message.validateOnly; + if (message.issuingCertificateAuthorityId != null && message.hasOwnProperty("issuingCertificateAuthorityId")) + object.issuingCertificateAuthorityId = message.issuingCertificateAuthorityId; + return object; + }; + + /** + * Converts this CreateCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCertificateRequest; + })(); + + v1.GetCertificateRequest = (function() { + + /** + * Properties of a GetCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IGetCertificateRequest + * @property {string|null} [name] GetCertificateRequest name + */ + + /** + * Constructs a new GetCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a GetCertificateRequest. + * @implements IGetCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IGetCertificateRequest=} [properties] Properties to set + */ + function GetCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @instance + */ + GetCertificateRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.GetCertificateRequest} GetCertificateRequest instance + */ + GetCertificateRequest.create = function create(properties) { + return new GetCertificateRequest(properties); + }; + + /** + * Encodes the specified GetCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateRequest} message GetCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRequest.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 GetCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateRequest} message GetCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.GetCertificateRequest} GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.GetCertificateRequest(); + 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 GetCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.GetCertificateRequest} GetCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateRequest.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 GetCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.GetCertificateRequest} GetCertificateRequest + */ + GetCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.GetCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.GetCertificateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.GetCertificateRequest} message GetCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateRequest.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 GetCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateRequest; + })(); + + v1.ListCertificatesRequest = (function() { + + /** + * Properties of a ListCertificatesRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificatesRequest + * @property {string|null} [parent] ListCertificatesRequest parent + * @property {number|null} [pageSize] ListCertificatesRequest pageSize + * @property {string|null} [pageToken] ListCertificatesRequest pageToken + * @property {string|null} [filter] ListCertificatesRequest filter + * @property {string|null} [orderBy] ListCertificatesRequest orderBy + */ + + /** + * Constructs a new ListCertificatesRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificatesRequest. + * @implements IListCertificatesRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificatesRequest=} [properties] Properties to set + */ + function ListCertificatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificatesRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.parent = ""; + + /** + * ListCertificatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.pageSize = 0; + + /** + * ListCertificatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.pageToken = ""; + + /** + * ListCertificatesRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.filter = ""; + + /** + * ListCertificatesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @instance + */ + ListCertificatesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificatesRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificatesRequest} ListCertificatesRequest instance + */ + ListCertificatesRequest.create = function create(properties) { + return new ListCertificatesRequest(properties); + }; + + /** + * Encodes the specified ListCertificatesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificatesRequest} message ListCertificatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesRequest.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 ListCertificatesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificatesRequest} message ListCertificatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificatesRequest} ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificatesRequest(); + 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 ListCertificatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificatesRequest} ListCertificatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificatesRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificatesRequest.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 ListCertificatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificatesRequest} ListCertificatesRequest + */ + ListCertificatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificatesRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificatesRequest(); + 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 ListCertificatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {google.cloud.security.privateca.v1.ListCertificatesRequest} message ListCertificatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificatesRequest.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 ListCertificatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificatesRequest; + })(); + + v1.ListCertificatesResponse = (function() { + + /** + * Properties of a ListCertificatesResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificatesResponse + * @property {Array.|null} [certificates] ListCertificatesResponse certificates + * @property {string|null} [nextPageToken] ListCertificatesResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificatesResponse unreachable + */ + + /** + * Constructs a new ListCertificatesResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificatesResponse. + * @implements IListCertificatesResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificatesResponse=} [properties] Properties to set + */ + function ListCertificatesResponse(properties) { + this.certificates = []; + 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]]; + } + + /** + * ListCertificatesResponse certificates. + * @member {Array.} certificates + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @instance + */ + ListCertificatesResponse.prototype.certificates = $util.emptyArray; + + /** + * ListCertificatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @instance + */ + ListCertificatesResponse.prototype.nextPageToken = ""; + + /** + * ListCertificatesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @instance + */ + ListCertificatesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificatesResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificatesResponse} ListCertificatesResponse instance + */ + ListCertificatesResponse.create = function create(properties) { + return new ListCertificatesResponse(properties); + }; + + /** + * Encodes the specified ListCertificatesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificatesResponse} message ListCertificatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificates != null && message.certificates.length) + for (var i = 0; i < message.certificates.length; ++i) + $root.google.cloud.security.privateca.v1.Certificate.encode(message.certificates[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 ListCertificatesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificatesResponse} message ListCertificatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificatesResponse} ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificates && message.certificates.length)) + message.certificates = []; + message.certificates.push($root.google.cloud.security.privateca.v1.Certificate.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 ListCertificatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificatesResponse} ListCertificatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificatesResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificates != null && message.hasOwnProperty("certificates")) { + if (!Array.isArray(message.certificates)) + return "certificates: array expected"; + for (var i = 0; i < message.certificates.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.Certificate.verify(message.certificates[i]); + if (error) + return "certificates." + 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 ListCertificatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificatesResponse} ListCertificatesResponse + */ + ListCertificatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificatesResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificatesResponse(); + if (object.certificates) { + if (!Array.isArray(object.certificates)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificatesResponse.certificates: array expected"); + message.certificates = []; + for (var i = 0; i < object.certificates.length; ++i) { + if (typeof object.certificates[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.ListCertificatesResponse.certificates: object expected"); + message.certificates[i] = $root.google.cloud.security.privateca.v1.Certificate.fromObject(object.certificates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificatesResponse.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 ListCertificatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {google.cloud.security.privateca.v1.ListCertificatesResponse} message ListCertificatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificates = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificates && message.certificates.length) { + object.certificates = []; + for (var j = 0; j < message.certificates.length; ++j) + object.certificates[j] = $root.google.cloud.security.privateca.v1.Certificate.toObject(message.certificates[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 ListCertificatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificatesResponse; + })(); + + v1.RevokeCertificateRequest = (function() { + + /** + * Properties of a RevokeCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IRevokeCertificateRequest + * @property {string|null} [name] RevokeCertificateRequest name + * @property {google.cloud.security.privateca.v1.RevocationReason|null} [reason] RevokeCertificateRequest reason + * @property {string|null} [requestId] RevokeCertificateRequest requestId + */ + + /** + * Constructs a new RevokeCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a RevokeCertificateRequest. + * @implements IRevokeCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IRevokeCertificateRequest=} [properties] Properties to set + */ + function RevokeCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RevokeCertificateRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @instance + */ + RevokeCertificateRequest.prototype.name = ""; + + /** + * RevokeCertificateRequest reason. + * @member {google.cloud.security.privateca.v1.RevocationReason} reason + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @instance + */ + RevokeCertificateRequest.prototype.reason = 0; + + /** + * RevokeCertificateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @instance + */ + RevokeCertificateRequest.prototype.requestId = ""; + + /** + * Creates a new RevokeCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IRevokeCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.RevokeCertificateRequest} RevokeCertificateRequest instance + */ + RevokeCertificateRequest.create = function create(properties) { + return new RevokeCertificateRequest(properties); + }; + + /** + * Encodes the specified RevokeCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.RevokeCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IRevokeCertificateRequest} message RevokeCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokeCertificateRequest.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.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.reason); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified RevokeCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.RevokeCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IRevokeCertificateRequest} message RevokeCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RevokeCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.RevokeCertificateRequest} RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokeCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.RevokeCertificateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.reason = reader.int32(); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RevokeCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.RevokeCertificateRequest} RevokeCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RevokeCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RevokeCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RevokeCertificateRequest.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.reason != null && message.hasOwnProperty("reason")) + switch (message.reason) { + default: + return "reason: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a RevokeCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.RevokeCertificateRequest} RevokeCertificateRequest + */ + RevokeCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.RevokeCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.RevokeCertificateRequest(); + if (object.name != null) + message.name = String(object.name); + switch (object.reason) { + case "REVOCATION_REASON_UNSPECIFIED": + case 0: + message.reason = 0; + break; + case "KEY_COMPROMISE": + case 1: + message.reason = 1; + break; + case "CERTIFICATE_AUTHORITY_COMPROMISE": + case 2: + message.reason = 2; + break; + case "AFFILIATION_CHANGED": + case 3: + message.reason = 3; + break; + case "SUPERSEDED": + case 4: + message.reason = 4; + break; + case "CESSATION_OF_OPERATION": + case 5: + message.reason = 5; + break; + case "CERTIFICATE_HOLD": + case 6: + message.reason = 6; + break; + case "PRIVILEGE_WITHDRAWN": + case 7: + message.reason = 7; + break; + case "ATTRIBUTE_AUTHORITY_COMPROMISE": + case 8: + message.reason = 8; + break; + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a RevokeCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.RevokeCertificateRequest} message RevokeCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RevokeCertificateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.reason = options.enums === String ? "REVOCATION_REASON_UNSPECIFIED" : 0; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.reason] : message.reason; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this RevokeCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + RevokeCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RevokeCertificateRequest; + })(); + + v1.UpdateCertificateRequest = (function() { + + /** + * Properties of an UpdateCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IUpdateCertificateRequest + * @property {google.cloud.security.privateca.v1.ICertificate|null} [certificate] UpdateCertificateRequest certificate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateRequest updateMask + * @property {string|null} [requestId] UpdateCertificateRequest requestId + */ + + /** + * Constructs a new UpdateCertificateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an UpdateCertificateRequest. + * @implements IUpdateCertificateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRequest=} [properties] Properties to set + */ + function UpdateCertificateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateRequest certificate. + * @member {google.cloud.security.privateca.v1.ICertificate|null|undefined} certificate + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @instance + */ + UpdateCertificateRequest.prototype.certificate = null; + + /** + * UpdateCertificateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @instance + */ + UpdateCertificateRequest.prototype.updateMask = null; + + /** + * UpdateCertificateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @instance + */ + UpdateCertificateRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRequest} UpdateCertificateRequest instance + */ + UpdateCertificateRequest.create = function create(properties) { + return new UpdateCertificateRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRequest} message UpdateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificate != null && Object.hasOwnProperty.call(message, "certificate")) + $root.google.cloud.security.privateca.v1.Certificate.encode(message.certificate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRequest} message UpdateCertificateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRequest} UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.UpdateCertificateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificate = $root.google.cloud.security.privateca.v1.Certificate.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRequest} UpdateCertificateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificate != null && message.hasOwnProperty("certificate")) { + var error = $root.google.cloud.security.privateca.v1.Certificate.verify(message.certificate); + if (error) + return "certificate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRequest} UpdateCertificateRequest + */ + UpdateCertificateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.UpdateCertificateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.UpdateCertificateRequest(); + if (object.certificate != null) { + if (typeof object.certificate !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateRequest.certificate: object expected"); + message.certificate = $root.google.cloud.security.privateca.v1.Certificate.fromObject(object.certificate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {google.cloud.security.privateca.v1.UpdateCertificateRequest} message UpdateCertificateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificate = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificate != null && message.hasOwnProperty("certificate")) + object.certificate = $root.google.cloud.security.privateca.v1.Certificate.toObject(message.certificate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateRequest; + })(); + + v1.ActivateCertificateAuthorityRequest = (function() { + + /** + * Properties of an ActivateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IActivateCertificateAuthorityRequest + * @property {string|null} [name] ActivateCertificateAuthorityRequest name + * @property {string|null} [pemCaCertificate] ActivateCertificateAuthorityRequest pemCaCertificate + * @property {google.cloud.security.privateca.v1.ISubordinateConfig|null} [subordinateConfig] ActivateCertificateAuthorityRequest subordinateConfig + * @property {string|null} [requestId] ActivateCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new ActivateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an ActivateCertificateAuthorityRequest. + * @implements IActivateCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest=} [properties] Properties to set + */ + function ActivateCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActivateCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.name = ""; + + /** + * ActivateCertificateAuthorityRequest pemCaCertificate. + * @member {string} pemCaCertificate + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.pemCaCertificate = ""; + + /** + * ActivateCertificateAuthorityRequest subordinateConfig. + * @member {google.cloud.security.privateca.v1.ISubordinateConfig|null|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.subordinateConfig = null; + + /** + * ActivateCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @instance + */ + ActivateCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new ActivateCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest instance + */ + ActivateCertificateAuthorityRequest.create = function create(properties) { + return new ActivateCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest} message ActivateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateCertificateAuthorityRequest.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.pemCaCertificate != null && Object.hasOwnProperty.call(message, "pemCaCertificate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pemCaCertificate); + if (message.subordinateConfig != null && Object.hasOwnProperty.call(message, "subordinateConfig")) + $root.google.cloud.security.privateca.v1.SubordinateConfig.encode(message.subordinateConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified ActivateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest} message ActivateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.pemCaCertificate = reader.string(); + break; + case 3: + message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateCertificateAuthorityRequest.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.pemCaCertificate != null && message.hasOwnProperty("pemCaCertificate")) + if (!$util.isString(message.pemCaCertificate)) + return "pemCaCertificate: string expected"; + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) { + var error = $root.google.cloud.security.privateca.v1.SubordinateConfig.verify(message.subordinateConfig); + if (error) + return "subordinateConfig." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an ActivateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest} ActivateCertificateAuthorityRequest + */ + ActivateCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.pemCaCertificate != null) + message.pemCaCertificate = String(object.pemCaCertificate); + if (object.subordinateConfig != null) { + if (typeof object.subordinateConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest.subordinateConfig: object expected"); + message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.fromObject(object.subordinateConfig); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an ActivateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest} message ActivateCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.pemCaCertificate = ""; + object.subordinateConfig = null; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.pemCaCertificate != null && message.hasOwnProperty("pemCaCertificate")) + object.pemCaCertificate = message.pemCaCertificate; + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) + object.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.toObject(message.subordinateConfig, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this ActivateCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + ActivateCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ActivateCertificateAuthorityRequest; + })(); + + v1.CreateCertificateAuthorityRequest = (function() { + + /** + * Properties of a CreateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface ICreateCertificateAuthorityRequest + * @property {string|null} [parent] CreateCertificateAuthorityRequest parent + * @property {string|null} [certificateAuthorityId] CreateCertificateAuthorityRequest certificateAuthorityId + * @property {google.cloud.security.privateca.v1.ICertificateAuthority|null} [certificateAuthority] CreateCertificateAuthorityRequest certificateAuthority + * @property {string|null} [requestId] CreateCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new CreateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CreateCertificateAuthorityRequest. + * @implements ICreateCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest=} [properties] Properties to set + */ + function CreateCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCertificateAuthorityRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.parent = ""; + + /** + * CreateCertificateAuthorityRequest certificateAuthorityId. + * @member {string} certificateAuthorityId + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.certificateAuthorityId = ""; + + /** + * CreateCertificateAuthorityRequest certificateAuthority. + * @member {google.cloud.security.privateca.v1.ICertificateAuthority|null|undefined} certificateAuthority + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.certificateAuthority = null; + + /** + * CreateCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @instance + */ + CreateCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new CreateCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest instance + */ + CreateCertificateAuthorityRequest.create = function create(properties) { + return new CreateCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest} message CreateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateAuthorityRequest.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.certificateAuthorityId != null && Object.hasOwnProperty.call(message, "certificateAuthorityId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateAuthorityId); + if (message.certificateAuthority != null && Object.hasOwnProperty.call(message, "certificateAuthority")) + $root.google.cloud.security.privateca.v1.CertificateAuthority.encode(message.certificateAuthority, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest} message CreateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.certificateAuthorityId = reader.string(); + break; + case 3: + message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCertificateAuthorityRequest.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.certificateAuthorityId != null && message.hasOwnProperty("certificateAuthorityId")) + if (!$util.isString(message.certificateAuthorityId)) + return "certificateAuthorityId: string expected"; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + var error = $root.google.cloud.security.privateca.v1.CertificateAuthority.verify(message.certificateAuthority); + if (error) + return "certificateAuthority." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest} CreateCertificateAuthorityRequest + */ + CreateCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.certificateAuthorityId != null) + message.certificateAuthorityId = String(object.certificateAuthorityId); + if (object.certificateAuthority != null) { + if (typeof object.certificateAuthority !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest.certificateAuthority: object expected"); + message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.fromObject(object.certificateAuthority); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest} message CreateCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.certificateAuthorityId = ""; + object.certificateAuthority = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.certificateAuthorityId != null && message.hasOwnProperty("certificateAuthorityId")) + object.certificateAuthorityId = message.certificateAuthorityId; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) + object.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.toObject(message.certificateAuthority, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCertificateAuthorityRequest; + })(); + + v1.DisableCertificateAuthorityRequest = (function() { + + /** + * Properties of a DisableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IDisableCertificateAuthorityRequest + * @property {string|null} [name] DisableCertificateAuthorityRequest name + * @property {string|null} [requestId] DisableCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new DisableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a DisableCertificateAuthorityRequest. + * @implements IDisableCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest=} [properties] Properties to set + */ + function DisableCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisableCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @instance + */ + DisableCertificateAuthorityRequest.prototype.name = ""; + + /** + * DisableCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @instance + */ + DisableCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new DisableCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest instance + */ + DisableCertificateAuthorityRequest.create = function create(properties) { + return new DisableCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest} message DisableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DisableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest} message DisableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisableCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisableCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisableCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisableCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DisableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest} DisableCertificateAuthorityRequest + */ + DisableCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DisableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest} message DisableCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisableCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DisableCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + DisableCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DisableCertificateAuthorityRequest; + })(); + + v1.EnableCertificateAuthorityRequest = (function() { + + /** + * Properties of an EnableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IEnableCertificateAuthorityRequest + * @property {string|null} [name] EnableCertificateAuthorityRequest name + * @property {string|null} [requestId] EnableCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new EnableCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an EnableCertificateAuthorityRequest. + * @implements IEnableCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest=} [properties] Properties to set + */ + function EnableCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnableCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @instance + */ + EnableCertificateAuthorityRequest.prototype.name = ""; + + /** + * EnableCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @instance + */ + EnableCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new EnableCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest instance + */ + EnableCertificateAuthorityRequest.create = function create(properties) { + return new EnableCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest} message EnableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified EnableCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest} message EnableCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnableCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnableCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnableCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnableCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnableCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an EnableCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest} EnableCertificateAuthorityRequest + */ + EnableCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an EnableCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest} message EnableCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnableCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this EnableCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + EnableCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnableCertificateAuthorityRequest; + })(); + + v1.FetchCertificateAuthorityCsrRequest = (function() { + + /** + * Properties of a FetchCertificateAuthorityCsrRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IFetchCertificateAuthorityCsrRequest + * @property {string|null} [name] FetchCertificateAuthorityCsrRequest name + */ + + /** + * Constructs a new FetchCertificateAuthorityCsrRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a FetchCertificateAuthorityCsrRequest. + * @implements IFetchCertificateAuthorityCsrRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest=} [properties] Properties to set + */ + function FetchCertificateAuthorityCsrRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchCertificateAuthorityCsrRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @instance + */ + FetchCertificateAuthorityCsrRequest.prototype.name = ""; + + /** + * Creates a new FetchCertificateAuthorityCsrRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest instance + */ + FetchCertificateAuthorityCsrRequest.create = function create(properties) { + return new FetchCertificateAuthorityCsrRequest(properties); + }; + + /** + * Encodes the specified FetchCertificateAuthorityCsrRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest} message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrRequest.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 FetchCertificateAuthorityCsrRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest} message FetchCertificateAuthorityCsrRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchCertificateAuthorityCsrRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest(); + 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 FetchCertificateAuthorityCsrRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchCertificateAuthorityCsrRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchCertificateAuthorityCsrRequest.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 FetchCertificateAuthorityCsrRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest} FetchCertificateAuthorityCsrRequest + */ + FetchCertificateAuthorityCsrRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest} message FetchCertificateAuthorityCsrRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchCertificateAuthorityCsrRequest.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 FetchCertificateAuthorityCsrRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @instance + * @returns {Object.} JSON object + */ + FetchCertificateAuthorityCsrRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchCertificateAuthorityCsrRequest; + })(); + + v1.FetchCertificateAuthorityCsrResponse = (function() { + + /** + * Properties of a FetchCertificateAuthorityCsrResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IFetchCertificateAuthorityCsrResponse + * @property {string|null} [pemCsr] FetchCertificateAuthorityCsrResponse pemCsr + */ + + /** + * Constructs a new FetchCertificateAuthorityCsrResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a FetchCertificateAuthorityCsrResponse. + * @implements IFetchCertificateAuthorityCsrResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse=} [properties] Properties to set + */ + function FetchCertificateAuthorityCsrResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchCertificateAuthorityCsrResponse pemCsr. + * @member {string} pemCsr + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @instance + */ + FetchCertificateAuthorityCsrResponse.prototype.pemCsr = ""; + + /** + * Creates a new FetchCertificateAuthorityCsrResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse instance + */ + FetchCertificateAuthorityCsrResponse.create = function create(properties) { + return new FetchCertificateAuthorityCsrResponse(properties); + }; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse} message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pemCsr != null && Object.hasOwnProperty.call(message, "pemCsr")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pemCsr); + return writer; + }; + + /** + * Encodes the specified FetchCertificateAuthorityCsrResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse} message FetchCertificateAuthorityCsrResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCertificateAuthorityCsrResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pemCsr = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchCertificateAuthorityCsrResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCertificateAuthorityCsrResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchCertificateAuthorityCsrResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchCertificateAuthorityCsrResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pemCsr != null && message.hasOwnProperty("pemCsr")) + if (!$util.isString(message.pemCsr)) + return "pemCsr: string expected"; + return null; + }; + + /** + * Creates a FetchCertificateAuthorityCsrResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse} FetchCertificateAuthorityCsrResponse + */ + FetchCertificateAuthorityCsrResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse(); + if (object.pemCsr != null) + message.pemCsr = String(object.pemCsr); + return message; + }; + + /** + * Creates a plain object from a FetchCertificateAuthorityCsrResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse} message FetchCertificateAuthorityCsrResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchCertificateAuthorityCsrResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.pemCsr = ""; + if (message.pemCsr != null && message.hasOwnProperty("pemCsr")) + object.pemCsr = message.pemCsr; + return object; + }; + + /** + * Converts this FetchCertificateAuthorityCsrResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @instance + * @returns {Object.} JSON object + */ + FetchCertificateAuthorityCsrResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchCertificateAuthorityCsrResponse; + })(); + + v1.GetCertificateAuthorityRequest = (function() { + + /** + * Properties of a GetCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IGetCertificateAuthorityRequest + * @property {string|null} [name] GetCertificateAuthorityRequest name + */ + + /** + * Constructs a new GetCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a GetCertificateAuthorityRequest. + * @implements IGetCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest=} [properties] Properties to set + */ + function GetCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @instance + */ + GetCertificateAuthorityRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest instance + */ + GetCertificateAuthorityRequest.create = function create(properties) { + return new GetCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified GetCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest} message GetCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateAuthorityRequest.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 GetCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest} message GetCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest(); + 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 GetCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateAuthorityRequest.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 GetCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.GetCertificateAuthorityRequest} GetCertificateAuthorityRequest + */ + GetCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.GetCertificateAuthorityRequest} message GetCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateAuthorityRequest.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 GetCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateAuthorityRequest; + })(); + + v1.ListCertificateAuthoritiesRequest = (function() { + + /** + * Properties of a ListCertificateAuthoritiesRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificateAuthoritiesRequest + * @property {string|null} [parent] ListCertificateAuthoritiesRequest parent + * @property {number|null} [pageSize] ListCertificateAuthoritiesRequest pageSize + * @property {string|null} [pageToken] ListCertificateAuthoritiesRequest pageToken + * @property {string|null} [filter] ListCertificateAuthoritiesRequest filter + * @property {string|null} [orderBy] ListCertificateAuthoritiesRequest orderBy + */ + + /** + * Constructs a new ListCertificateAuthoritiesRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificateAuthoritiesRequest. + * @implements IListCertificateAuthoritiesRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest=} [properties] Properties to set + */ + function ListCertificateAuthoritiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificateAuthoritiesRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.parent = ""; + + /** + * ListCertificateAuthoritiesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.pageSize = 0; + + /** + * ListCertificateAuthoritiesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.pageToken = ""; + + /** + * ListCertificateAuthoritiesRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.filter = ""; + + /** + * ListCertificateAuthoritiesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @instance + */ + ListCertificateAuthoritiesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificateAuthoritiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest instance + */ + ListCertificateAuthoritiesRequest.create = function create(properties) { + return new ListCertificateAuthoritiesRequest(properties); + }; + + /** + * Encodes the specified ListCertificateAuthoritiesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest} message ListCertificateAuthoritiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesRequest.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 ListCertificateAuthoritiesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest} message ListCertificateAuthoritiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateAuthoritiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest(); + 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 ListCertificateAuthoritiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateAuthoritiesRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateAuthoritiesRequest.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 ListCertificateAuthoritiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest} ListCertificateAuthoritiesRequest + */ + ListCertificateAuthoritiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest(); + 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 ListCertificateAuthoritiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest} message ListCertificateAuthoritiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateAuthoritiesRequest.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 ListCertificateAuthoritiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificateAuthoritiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateAuthoritiesRequest; + })(); + + v1.ListCertificateAuthoritiesResponse = (function() { + + /** + * Properties of a ListCertificateAuthoritiesResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificateAuthoritiesResponse + * @property {Array.|null} [certificateAuthorities] ListCertificateAuthoritiesResponse certificateAuthorities + * @property {string|null} [nextPageToken] ListCertificateAuthoritiesResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificateAuthoritiesResponse unreachable + */ + + /** + * Constructs a new ListCertificateAuthoritiesResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificateAuthoritiesResponse. + * @implements IListCertificateAuthoritiesResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse=} [properties] Properties to set + */ + function ListCertificateAuthoritiesResponse(properties) { + this.certificateAuthorities = []; + 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]]; + } + + /** + * ListCertificateAuthoritiesResponse certificateAuthorities. + * @member {Array.} certificateAuthorities + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @instance + */ + ListCertificateAuthoritiesResponse.prototype.certificateAuthorities = $util.emptyArray; + + /** + * ListCertificateAuthoritiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @instance + */ + ListCertificateAuthoritiesResponse.prototype.nextPageToken = ""; + + /** + * ListCertificateAuthoritiesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @instance + */ + ListCertificateAuthoritiesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificateAuthoritiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse instance + */ + ListCertificateAuthoritiesResponse.create = function create(properties) { + return new ListCertificateAuthoritiesResponse(properties); + }; + + /** + * Encodes the specified ListCertificateAuthoritiesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse} message ListCertificateAuthoritiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateAuthorities != null && message.certificateAuthorities.length) + for (var i = 0; i < message.certificateAuthorities.length; ++i) + $root.google.cloud.security.privateca.v1.CertificateAuthority.encode(message.certificateAuthorities[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 ListCertificateAuthoritiesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse} message ListCertificateAuthoritiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateAuthoritiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateAuthoritiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificateAuthorities && message.certificateAuthorities.length)) + message.certificateAuthorities = []; + message.certificateAuthorities.push($root.google.cloud.security.privateca.v1.CertificateAuthority.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 ListCertificateAuthoritiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateAuthoritiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateAuthoritiesResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateAuthoritiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateAuthorities != null && message.hasOwnProperty("certificateAuthorities")) { + if (!Array.isArray(message.certificateAuthorities)) + return "certificateAuthorities: array expected"; + for (var i = 0; i < message.certificateAuthorities.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.CertificateAuthority.verify(message.certificateAuthorities[i]); + if (error) + return "certificateAuthorities." + 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 ListCertificateAuthoritiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse} ListCertificateAuthoritiesResponse + */ + ListCertificateAuthoritiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse(); + if (object.certificateAuthorities) { + if (!Array.isArray(object.certificateAuthorities)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.certificateAuthorities: array expected"); + message.certificateAuthorities = []; + for (var i = 0; i < object.certificateAuthorities.length; ++i) { + if (typeof object.certificateAuthorities[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.certificateAuthorities: object expected"); + message.certificateAuthorities[i] = $root.google.cloud.security.privateca.v1.CertificateAuthority.fromObject(object.certificateAuthorities[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.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 ListCertificateAuthoritiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse} message ListCertificateAuthoritiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateAuthoritiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificateAuthorities = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificateAuthorities && message.certificateAuthorities.length) { + object.certificateAuthorities = []; + for (var j = 0; j < message.certificateAuthorities.length; ++j) + object.certificateAuthorities[j] = $root.google.cloud.security.privateca.v1.CertificateAuthority.toObject(message.certificateAuthorities[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 ListCertificateAuthoritiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificateAuthoritiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateAuthoritiesResponse; + })(); + + v1.UndeleteCertificateAuthorityRequest = (function() { + + /** + * Properties of an UndeleteCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IUndeleteCertificateAuthorityRequest + * @property {string|null} [name] UndeleteCertificateAuthorityRequest name + * @property {string|null} [requestId] UndeleteCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new UndeleteCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an UndeleteCertificateAuthorityRequest. + * @implements IUndeleteCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest=} [properties] Properties to set + */ + function UndeleteCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UndeleteCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @instance + */ + UndeleteCertificateAuthorityRequest.prototype.name = ""; + + /** + * UndeleteCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @instance + */ + UndeleteCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new UndeleteCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest} UndeleteCertificateAuthorityRequest instance + */ + UndeleteCertificateAuthorityRequest.create = function create(properties) { + return new UndeleteCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified UndeleteCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest} message UndeleteCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UndeleteCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest} message UndeleteCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UndeleteCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UndeleteCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest} UndeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UndeleteCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest} UndeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UndeleteCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UndeleteCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UndeleteCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UndeleteCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest} UndeleteCertificateAuthorityRequest + */ + UndeleteCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UndeleteCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest} message UndeleteCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UndeleteCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UndeleteCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + UndeleteCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UndeleteCertificateAuthorityRequest; + })(); + + v1.DeleteCertificateAuthorityRequest = (function() { + + /** + * Properties of a DeleteCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IDeleteCertificateAuthorityRequest + * @property {string|null} [name] DeleteCertificateAuthorityRequest name + * @property {string|null} [requestId] DeleteCertificateAuthorityRequest requestId + * @property {boolean|null} [ignoreActiveCertificates] DeleteCertificateAuthorityRequest ignoreActiveCertificates + */ + + /** + * Constructs a new DeleteCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a DeleteCertificateAuthorityRequest. + * @implements IDeleteCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest=} [properties] Properties to set + */ + function DeleteCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteCertificateAuthorityRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @instance + */ + DeleteCertificateAuthorityRequest.prototype.name = ""; + + /** + * DeleteCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @instance + */ + DeleteCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * DeleteCertificateAuthorityRequest ignoreActiveCertificates. + * @member {boolean} ignoreActiveCertificates + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @instance + */ + DeleteCertificateAuthorityRequest.prototype.ignoreActiveCertificates = false; + + /** + * Creates a new DeleteCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest} DeleteCertificateAuthorityRequest instance + */ + DeleteCertificateAuthorityRequest.create = function create(properties) { + return new DeleteCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified DeleteCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest} message DeleteCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCertificateAuthorityRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.ignoreActiveCertificates != null && Object.hasOwnProperty.call(message, "ignoreActiveCertificates")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ignoreActiveCertificates); + return writer; + }; + + /** + * Encodes the specified DeleteCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest} message DeleteCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest} DeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + case 4: + message.ignoreActiveCertificates = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest} DeleteCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteCertificateAuthorityRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.ignoreActiveCertificates != null && message.hasOwnProperty("ignoreActiveCertificates")) + if (typeof message.ignoreActiveCertificates !== "boolean") + return "ignoreActiveCertificates: boolean expected"; + return null; + }; + + /** + * Creates a DeleteCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest} DeleteCertificateAuthorityRequest + */ + DeleteCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.ignoreActiveCertificates != null) + message.ignoreActiveCertificates = Boolean(object.ignoreActiveCertificates); + return message; + }; + + /** + * Creates a plain object from a DeleteCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest} message DeleteCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.ignoreActiveCertificates = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.ignoreActiveCertificates != null && message.hasOwnProperty("ignoreActiveCertificates")) + object.ignoreActiveCertificates = message.ignoreActiveCertificates; + return object; + }; + + /** + * Converts this DeleteCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteCertificateAuthorityRequest; + })(); + + v1.UpdateCertificateAuthorityRequest = (function() { + + /** + * Properties of an UpdateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IUpdateCertificateAuthorityRequest + * @property {google.cloud.security.privateca.v1.ICertificateAuthority|null} [certificateAuthority] UpdateCertificateAuthorityRequest certificateAuthority + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateAuthorityRequest updateMask + * @property {string|null} [requestId] UpdateCertificateAuthorityRequest requestId + */ + + /** + * Constructs a new UpdateCertificateAuthorityRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an UpdateCertificateAuthorityRequest. + * @implements IUpdateCertificateAuthorityRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest=} [properties] Properties to set + */ + function UpdateCertificateAuthorityRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateAuthorityRequest certificateAuthority. + * @member {google.cloud.security.privateca.v1.ICertificateAuthority|null|undefined} certificateAuthority + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @instance + */ + UpdateCertificateAuthorityRequest.prototype.certificateAuthority = null; + + /** + * UpdateCertificateAuthorityRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @instance + */ + UpdateCertificateAuthorityRequest.prototype.updateMask = null; + + /** + * UpdateCertificateAuthorityRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @instance + */ + UpdateCertificateAuthorityRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateAuthorityRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest instance + */ + UpdateCertificateAuthorityRequest.create = function create(properties) { + return new UpdateCertificateAuthorityRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest} message UpdateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateAuthorityRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateAuthority != null && Object.hasOwnProperty.call(message, "certificateAuthority")) + $root.google.cloud.security.privateca.v1.CertificateAuthority.encode(message.certificateAuthority, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateAuthorityRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest} message UpdateCertificateAuthorityRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateAuthorityRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateAuthorityRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateAuthorityRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateAuthorityRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateAuthorityRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateAuthorityRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) { + var error = $root.google.cloud.security.privateca.v1.CertificateAuthority.verify(message.certificateAuthority); + if (error) + return "certificateAuthority." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateAuthorityRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest} UpdateCertificateAuthorityRequest + */ + UpdateCertificateAuthorityRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest(); + if (object.certificateAuthority != null) { + if (typeof object.certificateAuthority !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest.certificateAuthority: object expected"); + message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.fromObject(object.certificateAuthority); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateAuthorityRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest} message UpdateCertificateAuthorityRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateAuthorityRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificateAuthority = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificateAuthority != null && message.hasOwnProperty("certificateAuthority")) + object.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.toObject(message.certificateAuthority, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateAuthorityRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateAuthorityRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateAuthorityRequest; + })(); + + v1.CreateCaPoolRequest = (function() { + + /** + * Properties of a CreateCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface ICreateCaPoolRequest + * @property {string|null} [parent] CreateCaPoolRequest parent + * @property {string|null} [caPoolId] CreateCaPoolRequest caPoolId + * @property {google.cloud.security.privateca.v1.ICaPool|null} [caPool] CreateCaPoolRequest caPool + * @property {string|null} [requestId] CreateCaPoolRequest requestId + */ + + /** + * Constructs a new CreateCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CreateCaPoolRequest. + * @implements ICreateCaPoolRequest + * @constructor + * @param {google.cloud.security.privateca.v1.ICreateCaPoolRequest=} [properties] Properties to set + */ + function CreateCaPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCaPoolRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @instance + */ + CreateCaPoolRequest.prototype.parent = ""; + + /** + * CreateCaPoolRequest caPoolId. + * @member {string} caPoolId + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @instance + */ + CreateCaPoolRequest.prototype.caPoolId = ""; + + /** + * CreateCaPoolRequest caPool. + * @member {google.cloud.security.privateca.v1.ICaPool|null|undefined} caPool + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @instance + */ + CreateCaPoolRequest.prototype.caPool = null; + + /** + * CreateCaPoolRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @instance + */ + CreateCaPoolRequest.prototype.requestId = ""; + + /** + * Creates a new CreateCaPoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCaPoolRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CreateCaPoolRequest} CreateCaPoolRequest instance + */ + CreateCaPoolRequest.create = function create(properties) { + return new CreateCaPoolRequest(properties); + }; + + /** + * Encodes the specified CreateCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCaPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCaPoolRequest} message CreateCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCaPoolRequest.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.caPoolId != null && Object.hasOwnProperty.call(message, "caPoolId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.caPoolId); + if (message.caPool != null && Object.hasOwnProperty.call(message, "caPool")) + $root.google.cloud.security.privateca.v1.CaPool.encode(message.caPool, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCaPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCaPoolRequest} message CreateCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCaPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCaPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CreateCaPoolRequest} CreateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCaPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CreateCaPoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.caPoolId = reader.string(); + break; + case 3: + message.caPool = $root.google.cloud.security.privateca.v1.CaPool.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCaPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CreateCaPoolRequest} CreateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCaPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCaPoolRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCaPoolRequest.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.caPoolId != null && message.hasOwnProperty("caPoolId")) + if (!$util.isString(message.caPoolId)) + return "caPoolId: string expected"; + if (message.caPool != null && message.hasOwnProperty("caPool")) { + var error = $root.google.cloud.security.privateca.v1.CaPool.verify(message.caPool); + if (error) + return "caPool." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CreateCaPoolRequest} CreateCaPoolRequest + */ + CreateCaPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CreateCaPoolRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.CreateCaPoolRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.caPoolId != null) + message.caPoolId = String(object.caPoolId); + if (object.caPool != null) { + if (typeof object.caPool !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CreateCaPoolRequest.caPool: object expected"); + message.caPool = $root.google.cloud.security.privateca.v1.CaPool.fromObject(object.caPool); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateCaPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.CreateCaPoolRequest} message CreateCaPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCaPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.caPoolId = ""; + object.caPool = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.caPoolId != null && message.hasOwnProperty("caPoolId")) + object.caPoolId = message.caPoolId; + if (message.caPool != null && message.hasOwnProperty("caPool")) + object.caPool = $root.google.cloud.security.privateca.v1.CaPool.toObject(message.caPool, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateCaPoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCaPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCaPoolRequest; + })(); + + v1.UpdateCaPoolRequest = (function() { + + /** + * Properties of an UpdateCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IUpdateCaPoolRequest + * @property {google.cloud.security.privateca.v1.ICaPool|null} [caPool] UpdateCaPoolRequest caPool + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCaPoolRequest updateMask + * @property {string|null} [requestId] UpdateCaPoolRequest requestId + */ + + /** + * Constructs a new UpdateCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an UpdateCaPoolRequest. + * @implements IUpdateCaPoolRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IUpdateCaPoolRequest=} [properties] Properties to set + */ + function UpdateCaPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCaPoolRequest caPool. + * @member {google.cloud.security.privateca.v1.ICaPool|null|undefined} caPool + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @instance + */ + UpdateCaPoolRequest.prototype.caPool = null; + + /** + * UpdateCaPoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @instance + */ + UpdateCaPoolRequest.prototype.updateMask = null; + + /** + * UpdateCaPoolRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @instance + */ + UpdateCaPoolRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCaPoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCaPoolRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.UpdateCaPoolRequest} UpdateCaPoolRequest instance + */ + UpdateCaPoolRequest.create = function create(properties) { + return new UpdateCaPoolRequest(properties); + }; + + /** + * Encodes the specified UpdateCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCaPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCaPoolRequest} message UpdateCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCaPoolRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caPool != null && Object.hasOwnProperty.call(message, "caPool")) + $root.google.cloud.security.privateca.v1.CaPool.encode(message.caPool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCaPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCaPoolRequest} message UpdateCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCaPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCaPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.UpdateCaPoolRequest} UpdateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCaPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.UpdateCaPoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.caPool = $root.google.cloud.security.privateca.v1.CaPool.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCaPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.UpdateCaPoolRequest} UpdateCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCaPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCaPoolRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCaPoolRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caPool != null && message.hasOwnProperty("caPool")) { + var error = $root.google.cloud.security.privateca.v1.CaPool.verify(message.caPool); + if (error) + return "caPool." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.UpdateCaPoolRequest} UpdateCaPoolRequest + */ + UpdateCaPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.UpdateCaPoolRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.UpdateCaPoolRequest(); + if (object.caPool != null) { + if (typeof object.caPool !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCaPoolRequest.caPool: object expected"); + message.caPool = $root.google.cloud.security.privateca.v1.CaPool.fromObject(object.caPool); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCaPoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCaPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.UpdateCaPoolRequest} message UpdateCaPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCaPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.caPool = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.caPool != null && message.hasOwnProperty("caPool")) + object.caPool = $root.google.cloud.security.privateca.v1.CaPool.toObject(message.caPool, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCaPoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCaPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCaPoolRequest; + })(); + + v1.DeleteCaPoolRequest = (function() { + + /** + * Properties of a DeleteCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IDeleteCaPoolRequest + * @property {string|null} [name] DeleteCaPoolRequest name + * @property {string|null} [requestId] DeleteCaPoolRequest requestId + */ + + /** + * Constructs a new DeleteCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a DeleteCaPoolRequest. + * @implements IDeleteCaPoolRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IDeleteCaPoolRequest=} [properties] Properties to set + */ + function DeleteCaPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteCaPoolRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @instance + */ + DeleteCaPoolRequest.prototype.name = ""; + + /** + * DeleteCaPoolRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @instance + */ + DeleteCaPoolRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteCaPoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCaPoolRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.DeleteCaPoolRequest} DeleteCaPoolRequest instance + */ + DeleteCaPoolRequest.create = function create(properties) { + return new DeleteCaPoolRequest(properties); + }; + + /** + * Encodes the specified DeleteCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCaPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCaPoolRequest} message DeleteCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCaPoolRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCaPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCaPoolRequest} message DeleteCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCaPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteCaPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.DeleteCaPoolRequest} DeleteCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCaPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.DeleteCaPoolRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteCaPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.DeleteCaPoolRequest} DeleteCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCaPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteCaPoolRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteCaPoolRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.DeleteCaPoolRequest} DeleteCaPoolRequest + */ + DeleteCaPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.DeleteCaPoolRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.DeleteCaPoolRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteCaPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.DeleteCaPoolRequest} message DeleteCaPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteCaPoolRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteCaPoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteCaPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteCaPoolRequest; + })(); + + v1.FetchCaCertsRequest = (function() { + + /** + * Properties of a FetchCaCertsRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IFetchCaCertsRequest + * @property {string|null} [caPool] FetchCaCertsRequest caPool + * @property {string|null} [requestId] FetchCaCertsRequest requestId + */ + + /** + * Constructs a new FetchCaCertsRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a FetchCaCertsRequest. + * @implements IFetchCaCertsRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IFetchCaCertsRequest=} [properties] Properties to set + */ + function FetchCaCertsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchCaCertsRequest caPool. + * @member {string} caPool + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @instance + */ + FetchCaCertsRequest.prototype.caPool = ""; + + /** + * FetchCaCertsRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @instance + */ + FetchCaCertsRequest.prototype.requestId = ""; + + /** + * Creates a new FetchCaCertsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {google.cloud.security.privateca.v1.IFetchCaCertsRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.FetchCaCertsRequest} FetchCaCertsRequest instance + */ + FetchCaCertsRequest.create = function create(properties) { + return new FetchCaCertsRequest(properties); + }; + + /** + * Encodes the specified FetchCaCertsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {google.cloud.security.privateca.v1.IFetchCaCertsRequest} message FetchCaCertsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCaCertsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caPool != null && Object.hasOwnProperty.call(message, "caPool")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.caPool); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified FetchCaCertsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {google.cloud.security.privateca.v1.IFetchCaCertsRequest} message FetchCaCertsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCaCertsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchCaCertsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.FetchCaCertsRequest} FetchCaCertsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCaCertsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.FetchCaCertsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.caPool = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchCaCertsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.FetchCaCertsRequest} FetchCaCertsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCaCertsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchCaCertsRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchCaCertsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caPool != null && message.hasOwnProperty("caPool")) + if (!$util.isString(message.caPool)) + return "caPool: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a FetchCaCertsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.FetchCaCertsRequest} FetchCaCertsRequest + */ + FetchCaCertsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.FetchCaCertsRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.FetchCaCertsRequest(); + if (object.caPool != null) + message.caPool = String(object.caPool); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a FetchCaCertsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {google.cloud.security.privateca.v1.FetchCaCertsRequest} message FetchCaCertsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchCaCertsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.caPool = ""; + object.requestId = ""; + } + if (message.caPool != null && message.hasOwnProperty("caPool")) + object.caPool = message.caPool; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this FetchCaCertsRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @instance + * @returns {Object.} JSON object + */ + FetchCaCertsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FetchCaCertsRequest; + })(); + + v1.FetchCaCertsResponse = (function() { + + /** + * Properties of a FetchCaCertsResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IFetchCaCertsResponse + * @property {Array.|null} [caCerts] FetchCaCertsResponse caCerts + */ + + /** + * Constructs a new FetchCaCertsResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a FetchCaCertsResponse. + * @implements IFetchCaCertsResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IFetchCaCertsResponse=} [properties] Properties to set + */ + function FetchCaCertsResponse(properties) { + this.caCerts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchCaCertsResponse caCerts. + * @member {Array.} caCerts + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @instance + */ + FetchCaCertsResponse.prototype.caCerts = $util.emptyArray; + + /** + * Creates a new FetchCaCertsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {google.cloud.security.privateca.v1.IFetchCaCertsResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse} FetchCaCertsResponse instance + */ + FetchCaCertsResponse.create = function create(properties) { + return new FetchCaCertsResponse(properties); + }; + + /** + * Encodes the specified FetchCaCertsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {google.cloud.security.privateca.v1.IFetchCaCertsResponse} message FetchCaCertsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCaCertsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caCerts != null && message.caCerts.length) + for (var i = 0; i < message.caCerts.length; ++i) + $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.encode(message.caCerts[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FetchCaCertsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {google.cloud.security.privateca.v1.IFetchCaCertsResponse} message FetchCaCertsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchCaCertsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchCaCertsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse} FetchCaCertsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCaCertsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.FetchCaCertsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.caCerts && message.caCerts.length)) + message.caCerts = []; + message.caCerts.push($root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchCaCertsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse} FetchCaCertsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchCaCertsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchCaCertsResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchCaCertsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caCerts != null && message.hasOwnProperty("caCerts")) { + if (!Array.isArray(message.caCerts)) + return "caCerts: array expected"; + for (var i = 0; i < message.caCerts.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.verify(message.caCerts[i]); + if (error) + return "caCerts." + error; + } + } + return null; + }; + + /** + * Creates a FetchCaCertsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse} FetchCaCertsResponse + */ + FetchCaCertsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.FetchCaCertsResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.FetchCaCertsResponse(); + if (object.caCerts) { + if (!Array.isArray(object.caCerts)) + throw TypeError(".google.cloud.security.privateca.v1.FetchCaCertsResponse.caCerts: array expected"); + message.caCerts = []; + for (var i = 0; i < object.caCerts.length; ++i) { + if (typeof object.caCerts[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.FetchCaCertsResponse.caCerts: object expected"); + message.caCerts[i] = $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.fromObject(object.caCerts[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FetchCaCertsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse} message FetchCaCertsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchCaCertsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.caCerts = []; + if (message.caCerts && message.caCerts.length) { + object.caCerts = []; + for (var j = 0; j < message.caCerts.length; ++j) + object.caCerts[j] = $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.toObject(message.caCerts[j], options); + } + return object; + }; + + /** + * Converts this FetchCaCertsResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @instance + * @returns {Object.} JSON object + */ + FetchCaCertsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + FetchCaCertsResponse.CertChain = (function() { + + /** + * Properties of a CertChain. + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @interface ICertChain + * @property {Array.|null} [certificates] CertChain certificates + */ + + /** + * Constructs a new CertChain. + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @classdesc Represents a CertChain. + * @implements ICertChain + * @constructor + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain=} [properties] Properties to set + */ + function CertChain(properties) { + this.certificates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertChain certificates. + * @member {Array.} certificates + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @instance + */ + CertChain.prototype.certificates = $util.emptyArray; + + /** + * Creates a new CertChain instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain} CertChain instance + */ + CertChain.create = function create(properties) { + return new CertChain(properties); + }; + + /** + * Encodes the specified CertChain message. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificates != null && message.certificates.length) + for (var i = 0; i < message.certificates.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.certificates[i]); + return writer; + }; + + /** + * Encodes the specified CertChain message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse.ICertChain} message CertChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertChain message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificates && message.certificates.length)) + message.certificates = []; + message.certificates.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CertChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain} CertChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertChain message. + * @function verify + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificates != null && message.hasOwnProperty("certificates")) { + if (!Array.isArray(message.certificates)) + return "certificates: array expected"; + for (var i = 0; i < message.certificates.length; ++i) + if (!$util.isString(message.certificates[i])) + return "certificates: string[] expected"; + } + return null; + }; + + /** + * Creates a CertChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain} CertChain + */ + CertChain.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain) + return object; + var message = new $root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain(); + if (object.certificates) { + if (!Array.isArray(object.certificates)) + throw TypeError(".google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.certificates: array expected"); + message.certificates = []; + for (var i = 0; i < object.certificates.length; ++i) + message.certificates[i] = String(object.certificates[i]); + } + return message; + }; + + /** + * Creates a plain object from a CertChain message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain} message CertChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.certificates = []; + if (message.certificates && message.certificates.length) { + object.certificates = []; + for (var j = 0; j < message.certificates.length; ++j) + object.certificates[j] = message.certificates[j]; + } + return object; + }; + + /** + * Converts this CertChain to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @instance + * @returns {Object.} JSON object + */ + CertChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CertChain; + })(); + + return FetchCaCertsResponse; + })(); + + v1.GetCaPoolRequest = (function() { + + /** + * Properties of a GetCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IGetCaPoolRequest + * @property {string|null} [name] GetCaPoolRequest name + */ + + /** + * Constructs a new GetCaPoolRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a GetCaPoolRequest. + * @implements IGetCaPoolRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IGetCaPoolRequest=} [properties] Properties to set + */ + function GetCaPoolRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCaPoolRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @instance + */ + GetCaPoolRequest.prototype.name = ""; + + /** + * Creates a new GetCaPoolRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCaPoolRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.GetCaPoolRequest} GetCaPoolRequest instance + */ + GetCaPoolRequest.create = function create(properties) { + return new GetCaPoolRequest(properties); + }; + + /** + * Encodes the specified GetCaPoolRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCaPoolRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCaPoolRequest} message GetCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCaPoolRequest.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 GetCaPoolRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCaPoolRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCaPoolRequest} message GetCaPoolRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCaPoolRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCaPoolRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.GetCaPoolRequest} GetCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCaPoolRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.GetCaPoolRequest(); + 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 GetCaPoolRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.GetCaPoolRequest} GetCaPoolRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCaPoolRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCaPoolRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCaPoolRequest.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 GetCaPoolRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.GetCaPoolRequest} GetCaPoolRequest + */ + GetCaPoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.GetCaPoolRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.GetCaPoolRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCaPoolRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {google.cloud.security.privateca.v1.GetCaPoolRequest} message GetCaPoolRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCaPoolRequest.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 GetCaPoolRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @instance + * @returns {Object.} JSON object + */ + GetCaPoolRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCaPoolRequest; + })(); + + v1.ListCaPoolsRequest = (function() { + + /** + * Properties of a ListCaPoolsRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCaPoolsRequest + * @property {string|null} [parent] ListCaPoolsRequest parent + * @property {number|null} [pageSize] ListCaPoolsRequest pageSize + * @property {string|null} [pageToken] ListCaPoolsRequest pageToken + * @property {string|null} [filter] ListCaPoolsRequest filter + * @property {string|null} [orderBy] ListCaPoolsRequest orderBy + */ + + /** + * Constructs a new ListCaPoolsRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCaPoolsRequest. + * @implements IListCaPoolsRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IListCaPoolsRequest=} [properties] Properties to set + */ + function ListCaPoolsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCaPoolsRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @instance + */ + ListCaPoolsRequest.prototype.parent = ""; + + /** + * ListCaPoolsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @instance + */ + ListCaPoolsRequest.prototype.pageSize = 0; + + /** + * ListCaPoolsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @instance + */ + ListCaPoolsRequest.prototype.pageToken = ""; + + /** + * ListCaPoolsRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @instance + */ + ListCaPoolsRequest.prototype.filter = ""; + + /** + * ListCaPoolsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @instance + */ + ListCaPoolsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCaPoolsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCaPoolsRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCaPoolsRequest} ListCaPoolsRequest instance + */ + ListCaPoolsRequest.create = function create(properties) { + return new ListCaPoolsRequest(properties); + }; + + /** + * Encodes the specified ListCaPoolsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCaPoolsRequest} message ListCaPoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCaPoolsRequest.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 ListCaPoolsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCaPoolsRequest} message ListCaPoolsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCaPoolsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCaPoolsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCaPoolsRequest} ListCaPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCaPoolsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCaPoolsRequest(); + 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 ListCaPoolsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCaPoolsRequest} ListCaPoolsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCaPoolsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCaPoolsRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCaPoolsRequest.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 ListCaPoolsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCaPoolsRequest} ListCaPoolsRequest + */ + ListCaPoolsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCaPoolsRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCaPoolsRequest(); + 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 ListCaPoolsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {google.cloud.security.privateca.v1.ListCaPoolsRequest} message ListCaPoolsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCaPoolsRequest.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 ListCaPoolsRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCaPoolsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCaPoolsRequest; + })(); + + v1.ListCaPoolsResponse = (function() { + + /** + * Properties of a ListCaPoolsResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCaPoolsResponse + * @property {Array.|null} [caPools] ListCaPoolsResponse caPools + * @property {string|null} [nextPageToken] ListCaPoolsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCaPoolsResponse unreachable + */ + + /** + * Constructs a new ListCaPoolsResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCaPoolsResponse. + * @implements IListCaPoolsResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IListCaPoolsResponse=} [properties] Properties to set + */ + function ListCaPoolsResponse(properties) { + this.caPools = []; + 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]]; + } + + /** + * ListCaPoolsResponse caPools. + * @member {Array.} caPools + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @instance + */ + ListCaPoolsResponse.prototype.caPools = $util.emptyArray; + + /** + * ListCaPoolsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @instance + */ + ListCaPoolsResponse.prototype.nextPageToken = ""; + + /** + * ListCaPoolsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @instance + */ + ListCaPoolsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCaPoolsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCaPoolsResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCaPoolsResponse} ListCaPoolsResponse instance + */ + ListCaPoolsResponse.create = function create(properties) { + return new ListCaPoolsResponse(properties); + }; + + /** + * Encodes the specified ListCaPoolsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCaPoolsResponse} message ListCaPoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCaPoolsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.caPools != null && message.caPools.length) + for (var i = 0; i < message.caPools.length; ++i) + $root.google.cloud.security.privateca.v1.CaPool.encode(message.caPools[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 ListCaPoolsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCaPoolsResponse} message ListCaPoolsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCaPoolsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCaPoolsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCaPoolsResponse} ListCaPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCaPoolsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCaPoolsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.caPools && message.caPools.length)) + message.caPools = []; + message.caPools.push($root.google.cloud.security.privateca.v1.CaPool.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 ListCaPoolsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCaPoolsResponse} ListCaPoolsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCaPoolsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCaPoolsResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCaPoolsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.caPools != null && message.hasOwnProperty("caPools")) { + if (!Array.isArray(message.caPools)) + return "caPools: array expected"; + for (var i = 0; i < message.caPools.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.CaPool.verify(message.caPools[i]); + if (error) + return "caPools." + 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 ListCaPoolsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCaPoolsResponse} ListCaPoolsResponse + */ + ListCaPoolsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCaPoolsResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCaPoolsResponse(); + if (object.caPools) { + if (!Array.isArray(object.caPools)) + throw TypeError(".google.cloud.security.privateca.v1.ListCaPoolsResponse.caPools: array expected"); + message.caPools = []; + for (var i = 0; i < object.caPools.length; ++i) { + if (typeof object.caPools[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.ListCaPoolsResponse.caPools: object expected"); + message.caPools[i] = $root.google.cloud.security.privateca.v1.CaPool.fromObject(object.caPools[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1.ListCaPoolsResponse.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 ListCaPoolsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {google.cloud.security.privateca.v1.ListCaPoolsResponse} message ListCaPoolsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCaPoolsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.caPools = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.caPools && message.caPools.length) { + object.caPools = []; + for (var j = 0; j < message.caPools.length; ++j) + object.caPools[j] = $root.google.cloud.security.privateca.v1.CaPool.toObject(message.caPools[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 ListCaPoolsResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCaPoolsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCaPoolsResponse; + })(); + + v1.GetCertificateRevocationListRequest = (function() { + + /** + * Properties of a GetCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IGetCertificateRevocationListRequest + * @property {string|null} [name] GetCertificateRevocationListRequest name + */ + + /** + * Constructs a new GetCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a GetCertificateRevocationListRequest. + * @implements IGetCertificateRevocationListRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest=} [properties] Properties to set + */ + function GetCertificateRevocationListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateRevocationListRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @instance + */ + GetCertificateRevocationListRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateRevocationListRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest instance + */ + GetCertificateRevocationListRequest.create = function create(properties) { + return new GetCertificateRevocationListRequest(properties); + }; + + /** + * Encodes the specified GetCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRevocationListRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateRevocationListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest} message GetCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateRevocationListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRevocationListRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest(); + 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 GetCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateRevocationListRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.GetCertificateRevocationListRequest} GetCertificateRevocationListRequest + */ + GetCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateRevocationListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.GetCertificateRevocationListRequest} message GetCertificateRevocationListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateRevocationListRequest.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 GetCertificateRevocationListRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateRevocationListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateRevocationListRequest; + })(); + + v1.ListCertificateRevocationListsRequest = (function() { + + /** + * Properties of a ListCertificateRevocationListsRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificateRevocationListsRequest + * @property {string|null} [parent] ListCertificateRevocationListsRequest parent + * @property {number|null} [pageSize] ListCertificateRevocationListsRequest pageSize + * @property {string|null} [pageToken] ListCertificateRevocationListsRequest pageToken + * @property {string|null} [filter] ListCertificateRevocationListsRequest filter + * @property {string|null} [orderBy] ListCertificateRevocationListsRequest orderBy + */ + + /** + * Constructs a new ListCertificateRevocationListsRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificateRevocationListsRequest. + * @implements IListCertificateRevocationListsRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest=} [properties] Properties to set + */ + function ListCertificateRevocationListsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificateRevocationListsRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.parent = ""; + + /** + * ListCertificateRevocationListsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.pageSize = 0; + + /** + * ListCertificateRevocationListsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.pageToken = ""; + + /** + * ListCertificateRevocationListsRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.filter = ""; + + /** + * ListCertificateRevocationListsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @instance + */ + ListCertificateRevocationListsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificateRevocationListsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest instance + */ + ListCertificateRevocationListsRequest.create = function create(properties) { + return new ListCertificateRevocationListsRequest(properties); + }; + + /** + * Encodes the specified ListCertificateRevocationListsRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest} message ListCertificateRevocationListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsRequest.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 ListCertificateRevocationListsRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest} message ListCertificateRevocationListsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateRevocationListsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest(); + 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 ListCertificateRevocationListsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateRevocationListsRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateRevocationListsRequest.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 ListCertificateRevocationListsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest} ListCertificateRevocationListsRequest + */ + ListCertificateRevocationListsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest(); + 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 ListCertificateRevocationListsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest} message ListCertificateRevocationListsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateRevocationListsRequest.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 ListCertificateRevocationListsRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificateRevocationListsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateRevocationListsRequest; + })(); + + v1.ListCertificateRevocationListsResponse = (function() { + + /** + * Properties of a ListCertificateRevocationListsResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificateRevocationListsResponse + * @property {Array.|null} [certificateRevocationLists] ListCertificateRevocationListsResponse certificateRevocationLists + * @property {string|null} [nextPageToken] ListCertificateRevocationListsResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificateRevocationListsResponse unreachable + */ + + /** + * Constructs a new ListCertificateRevocationListsResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificateRevocationListsResponse. + * @implements IListCertificateRevocationListsResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse=} [properties] Properties to set + */ + function ListCertificateRevocationListsResponse(properties) { + this.certificateRevocationLists = []; + 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]]; + } + + /** + * ListCertificateRevocationListsResponse certificateRevocationLists. + * @member {Array.} certificateRevocationLists + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @instance + */ + ListCertificateRevocationListsResponse.prototype.certificateRevocationLists = $util.emptyArray; + + /** + * ListCertificateRevocationListsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @instance + */ + ListCertificateRevocationListsResponse.prototype.nextPageToken = ""; + + /** + * ListCertificateRevocationListsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @instance + */ + ListCertificateRevocationListsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificateRevocationListsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse instance + */ + ListCertificateRevocationListsResponse.create = function create(properties) { + return new ListCertificateRevocationListsResponse(properties); + }; + + /** + * Encodes the specified ListCertificateRevocationListsResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse} message ListCertificateRevocationListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateRevocationLists != null && message.certificateRevocationLists.length) + for (var i = 0; i < message.certificateRevocationLists.length; ++i) + $root.google.cloud.security.privateca.v1.CertificateRevocationList.encode(message.certificateRevocationLists[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 ListCertificateRevocationListsResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse} message ListCertificateRevocationListsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateRevocationListsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateRevocationListsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificateRevocationLists && message.certificateRevocationLists.length)) + message.certificateRevocationLists = []; + message.certificateRevocationLists.push($root.google.cloud.security.privateca.v1.CertificateRevocationList.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 ListCertificateRevocationListsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateRevocationListsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateRevocationListsResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateRevocationListsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateRevocationLists != null && message.hasOwnProperty("certificateRevocationLists")) { + if (!Array.isArray(message.certificateRevocationLists)) + return "certificateRevocationLists: array expected"; + for (var i = 0; i < message.certificateRevocationLists.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.CertificateRevocationList.verify(message.certificateRevocationLists[i]); + if (error) + return "certificateRevocationLists." + 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 ListCertificateRevocationListsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse} ListCertificateRevocationListsResponse + */ + ListCertificateRevocationListsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse(); + if (object.certificateRevocationLists) { + if (!Array.isArray(object.certificateRevocationLists)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.certificateRevocationLists: array expected"); + message.certificateRevocationLists = []; + for (var i = 0; i < object.certificateRevocationLists.length; ++i) { + if (typeof object.certificateRevocationLists[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.certificateRevocationLists: object expected"); + message.certificateRevocationLists[i] = $root.google.cloud.security.privateca.v1.CertificateRevocationList.fromObject(object.certificateRevocationLists[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.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 ListCertificateRevocationListsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse} message ListCertificateRevocationListsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateRevocationListsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificateRevocationLists = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificateRevocationLists && message.certificateRevocationLists.length) { + object.certificateRevocationLists = []; + for (var j = 0; j < message.certificateRevocationLists.length; ++j) + object.certificateRevocationLists[j] = $root.google.cloud.security.privateca.v1.CertificateRevocationList.toObject(message.certificateRevocationLists[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 ListCertificateRevocationListsResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificateRevocationListsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateRevocationListsResponse; + })(); + + v1.UpdateCertificateRevocationListRequest = (function() { + + /** + * Properties of an UpdateCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IUpdateCertificateRevocationListRequest + * @property {google.cloud.security.privateca.v1.ICertificateRevocationList|null} [certificateRevocationList] UpdateCertificateRevocationListRequest certificateRevocationList + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateRevocationListRequest updateMask + * @property {string|null} [requestId] UpdateCertificateRevocationListRequest requestId + */ + + /** + * Constructs a new UpdateCertificateRevocationListRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an UpdateCertificateRevocationListRequest. + * @implements IUpdateCertificateRevocationListRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest=} [properties] Properties to set + */ + function UpdateCertificateRevocationListRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateRevocationListRequest certificateRevocationList. + * @member {google.cloud.security.privateca.v1.ICertificateRevocationList|null|undefined} certificateRevocationList + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @instance + */ + UpdateCertificateRevocationListRequest.prototype.certificateRevocationList = null; + + /** + * UpdateCertificateRevocationListRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @instance + */ + UpdateCertificateRevocationListRequest.prototype.updateMask = null; + + /** + * UpdateCertificateRevocationListRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @instance + */ + UpdateCertificateRevocationListRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateRevocationListRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest instance + */ + UpdateCertificateRevocationListRequest.create = function create(properties) { + return new UpdateCertificateRevocationListRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRevocationListRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateRevocationList != null && Object.hasOwnProperty.call(message, "certificateRevocationList")) + $root.google.cloud.security.privateca.v1.CertificateRevocationList.encode(message.certificateRevocationList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateRevocationListRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateRevocationListRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRevocationListRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateRevocationList = $root.google.cloud.security.privateca.v1.CertificateRevocationList.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateRevocationListRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateRevocationListRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateRevocationListRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateRevocationListRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) { + var error = $root.google.cloud.security.privateca.v1.CertificateRevocationList.verify(message.certificateRevocationList); + if (error) + return "certificateRevocationList." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateRevocationListRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest} UpdateCertificateRevocationListRequest + */ + UpdateCertificateRevocationListRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest(); + if (object.certificateRevocationList != null) { + if (typeof object.certificateRevocationList !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest.certificateRevocationList: object expected"); + message.certificateRevocationList = $root.google.cloud.security.privateca.v1.CertificateRevocationList.fromObject(object.certificateRevocationList); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateRevocationListRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest} message UpdateCertificateRevocationListRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateRevocationListRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificateRevocationList = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificateRevocationList != null && message.hasOwnProperty("certificateRevocationList")) + object.certificateRevocationList = $root.google.cloud.security.privateca.v1.CertificateRevocationList.toObject(message.certificateRevocationList, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateRevocationListRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateRevocationListRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateRevocationListRequest; + })(); + + v1.CreateCertificateTemplateRequest = (function() { + + /** + * Properties of a CreateCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface ICreateCertificateTemplateRequest + * @property {string|null} [parent] CreateCertificateTemplateRequest parent + * @property {string|null} [certificateTemplateId] CreateCertificateTemplateRequest certificateTemplateId + * @property {google.cloud.security.privateca.v1.ICertificateTemplate|null} [certificateTemplate] CreateCertificateTemplateRequest certificateTemplate + * @property {string|null} [requestId] CreateCertificateTemplateRequest requestId + */ + + /** + * Constructs a new CreateCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a CreateCertificateTemplateRequest. + * @implements ICreateCertificateTemplateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest=} [properties] Properties to set + */ + function CreateCertificateTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCertificateTemplateRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @instance + */ + CreateCertificateTemplateRequest.prototype.parent = ""; + + /** + * CreateCertificateTemplateRequest certificateTemplateId. + * @member {string} certificateTemplateId + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @instance + */ + CreateCertificateTemplateRequest.prototype.certificateTemplateId = ""; + + /** + * CreateCertificateTemplateRequest certificateTemplate. + * @member {google.cloud.security.privateca.v1.ICertificateTemplate|null|undefined} certificateTemplate + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @instance + */ + CreateCertificateTemplateRequest.prototype.certificateTemplate = null; + + /** + * CreateCertificateTemplateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @instance + */ + CreateCertificateTemplateRequest.prototype.requestId = ""; + + /** + * Creates a new CreateCertificateTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CreateCertificateTemplateRequest} CreateCertificateTemplateRequest instance + */ + CreateCertificateTemplateRequest.create = function create(properties) { + return new CreateCertificateTemplateRequest(properties); + }; + + /** + * Encodes the specified CreateCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest} message CreateCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateTemplateRequest.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.certificateTemplateId != null && Object.hasOwnProperty.call(message, "certificateTemplateId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.certificateTemplateId); + if (message.certificateTemplate != null && Object.hasOwnProperty.call(message, "certificateTemplate")) + $root.google.cloud.security.privateca.v1.CertificateTemplate.encode(message.certificateTemplate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CreateCertificateTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest} message CreateCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCertificateTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCertificateTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CreateCertificateTemplateRequest} CreateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateTemplateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.parent = reader.string(); + break; + case 2: + message.certificateTemplateId = reader.string(); + break; + case 3: + message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.decode(reader, reader.uint32()); + break; + case 4: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CreateCertificateTemplateRequest} CreateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCertificateTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCertificateTemplateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCertificateTemplateRequest.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.certificateTemplateId != null && message.hasOwnProperty("certificateTemplateId")) + if (!$util.isString(message.certificateTemplateId)) + return "certificateTemplateId: string expected"; + if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) { + var error = $root.google.cloud.security.privateca.v1.CertificateTemplate.verify(message.certificateTemplate); + if (error) + return "certificateTemplate." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CreateCertificateTemplateRequest} CreateCertificateTemplateRequest + */ + CreateCertificateTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.certificateTemplateId != null) + message.certificateTemplateId = String(object.certificateTemplateId); + if (object.certificateTemplate != null) { + if (typeof object.certificateTemplate !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CreateCertificateTemplateRequest.certificateTemplate: object expected"); + message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.fromObject(object.certificateTemplate); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateCertificateTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.CreateCertificateTemplateRequest} message CreateCertificateTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCertificateTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.certificateTemplateId = ""; + object.certificateTemplate = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.certificateTemplateId != null && message.hasOwnProperty("certificateTemplateId")) + object.certificateTemplateId = message.certificateTemplateId; + if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) + object.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.toObject(message.certificateTemplate, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateCertificateTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCertificateTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CreateCertificateTemplateRequest; + })(); + + v1.DeleteCertificateTemplateRequest = (function() { + + /** + * Properties of a DeleteCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IDeleteCertificateTemplateRequest + * @property {string|null} [name] DeleteCertificateTemplateRequest name + * @property {string|null} [requestId] DeleteCertificateTemplateRequest requestId + */ + + /** + * Constructs a new DeleteCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a DeleteCertificateTemplateRequest. + * @implements IDeleteCertificateTemplateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest=} [properties] Properties to set + */ + function DeleteCertificateTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteCertificateTemplateRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @instance + */ + DeleteCertificateTemplateRequest.prototype.name = ""; + + /** + * DeleteCertificateTemplateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @instance + */ + DeleteCertificateTemplateRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteCertificateTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest} DeleteCertificateTemplateRequest instance + */ + DeleteCertificateTemplateRequest.create = function create(properties) { + return new DeleteCertificateTemplateRequest(properties); + }; + + /** + * Encodes the specified DeleteCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest} message DeleteCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCertificateTemplateRequest.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.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest} message DeleteCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteCertificateTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteCertificateTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest} DeleteCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCertificateTemplateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest} DeleteCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteCertificateTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteCertificateTemplateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteCertificateTemplateRequest.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.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest} DeleteCertificateTemplateRequest + */ + DeleteCertificateTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteCertificateTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest} message DeleteCertificateTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteCertificateTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteCertificateTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteCertificateTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DeleteCertificateTemplateRequest; + })(); + + v1.GetCertificateTemplateRequest = (function() { + + /** + * Properties of a GetCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IGetCertificateTemplateRequest + * @property {string|null} [name] GetCertificateTemplateRequest name + */ + + /** + * Constructs a new GetCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a GetCertificateTemplateRequest. + * @implements IGetCertificateTemplateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IGetCertificateTemplateRequest=} [properties] Properties to set + */ + function GetCertificateTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCertificateTemplateRequest name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @instance + */ + GetCertificateTemplateRequest.prototype.name = ""; + + /** + * Creates a new GetCertificateTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.GetCertificateTemplateRequest} GetCertificateTemplateRequest instance + */ + GetCertificateTemplateRequest.create = function create(properties) { + return new GetCertificateTemplateRequest(properties); + }; + + /** + * Encodes the specified GetCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateTemplateRequest} message GetCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateTemplateRequest.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 GetCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.GetCertificateTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IGetCertificateTemplateRequest} message GetCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCertificateTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCertificateTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.GetCertificateTemplateRequest} GetCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateTemplateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.GetCertificateTemplateRequest(); + 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 GetCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.GetCertificateTemplateRequest} GetCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCertificateTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCertificateTemplateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCertificateTemplateRequest.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 GetCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.GetCertificateTemplateRequest} GetCertificateTemplateRequest + */ + GetCertificateTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.GetCertificateTemplateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.GetCertificateTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCertificateTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.GetCertificateTemplateRequest} message GetCertificateTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCertificateTemplateRequest.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 GetCertificateTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + GetCertificateTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetCertificateTemplateRequest; + })(); + + v1.ListCertificateTemplatesRequest = (function() { + + /** + * Properties of a ListCertificateTemplatesRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificateTemplatesRequest + * @property {string|null} [parent] ListCertificateTemplatesRequest parent + * @property {number|null} [pageSize] ListCertificateTemplatesRequest pageSize + * @property {string|null} [pageToken] ListCertificateTemplatesRequest pageToken + * @property {string|null} [filter] ListCertificateTemplatesRequest filter + * @property {string|null} [orderBy] ListCertificateTemplatesRequest orderBy + */ + + /** + * Constructs a new ListCertificateTemplatesRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificateTemplatesRequest. + * @implements IListCertificateTemplatesRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesRequest=} [properties] Properties to set + */ + function ListCertificateTemplatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCertificateTemplatesRequest parent. + * @member {string} parent + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @instance + */ + ListCertificateTemplatesRequest.prototype.parent = ""; + + /** + * ListCertificateTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @instance + */ + ListCertificateTemplatesRequest.prototype.pageSize = 0; + + /** + * ListCertificateTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @instance + */ + ListCertificateTemplatesRequest.prototype.pageToken = ""; + + /** + * ListCertificateTemplatesRequest filter. + * @member {string} filter + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @instance + */ + ListCertificateTemplatesRequest.prototype.filter = ""; + + /** + * ListCertificateTemplatesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @instance + */ + ListCertificateTemplatesRequest.prototype.orderBy = ""; + + /** + * Creates a new ListCertificateTemplatesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesRequest} ListCertificateTemplatesRequest instance + */ + ListCertificateTemplatesRequest.create = function create(properties) { + return new ListCertificateTemplatesRequest(properties); + }; + + /** + * Encodes the specified ListCertificateTemplatesRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesRequest} message ListCertificateTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateTemplatesRequest.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 ListCertificateTemplatesRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesRequest} message ListCertificateTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateTemplatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesRequest} ListCertificateTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateTemplatesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest(); + 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 ListCertificateTemplatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesRequest} ListCertificateTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateTemplatesRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateTemplatesRequest.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 ListCertificateTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesRequest} ListCertificateTemplatesRequest + */ + ListCertificateTemplatesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest(); + 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 ListCertificateTemplatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {google.cloud.security.privateca.v1.ListCertificateTemplatesRequest} message ListCertificateTemplatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateTemplatesRequest.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 ListCertificateTemplatesRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListCertificateTemplatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateTemplatesRequest; + })(); + + v1.ListCertificateTemplatesResponse = (function() { + + /** + * Properties of a ListCertificateTemplatesResponse. + * @memberof google.cloud.security.privateca.v1 + * @interface IListCertificateTemplatesResponse + * @property {Array.|null} [certificateTemplates] ListCertificateTemplatesResponse certificateTemplates + * @property {string|null} [nextPageToken] ListCertificateTemplatesResponse nextPageToken + * @property {Array.|null} [unreachable] ListCertificateTemplatesResponse unreachable + */ + + /** + * Constructs a new ListCertificateTemplatesResponse. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents a ListCertificateTemplatesResponse. + * @implements IListCertificateTemplatesResponse + * @constructor + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesResponse=} [properties] Properties to set + */ + function ListCertificateTemplatesResponse(properties) { + this.certificateTemplates = []; + 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]]; + } + + /** + * ListCertificateTemplatesResponse certificateTemplates. + * @member {Array.} certificateTemplates + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @instance + */ + ListCertificateTemplatesResponse.prototype.certificateTemplates = $util.emptyArray; + + /** + * ListCertificateTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @instance + */ + ListCertificateTemplatesResponse.prototype.nextPageToken = ""; + + /** + * ListCertificateTemplatesResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @instance + */ + ListCertificateTemplatesResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListCertificateTemplatesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesResponse=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesResponse} ListCertificateTemplatesResponse instance + */ + ListCertificateTemplatesResponse.create = function create(properties) { + return new ListCertificateTemplatesResponse(properties); + }; + + /** + * Encodes the specified ListCertificateTemplatesResponse message. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesResponse} message ListCertificateTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateTemplatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateTemplates != null && message.certificateTemplates.length) + for (var i = 0; i < message.certificateTemplates.length; ++i) + $root.google.cloud.security.privateca.v1.CertificateTemplate.encode(message.certificateTemplates[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 ListCertificateTemplatesResponse message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {google.cloud.security.privateca.v1.IListCertificateTemplatesResponse} message ListCertificateTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCertificateTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCertificateTemplatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesResponse} ListCertificateTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateTemplatesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.certificateTemplates && message.certificateTemplates.length)) + message.certificateTemplates = []; + message.certificateTemplates.push($root.google.cloud.security.privateca.v1.CertificateTemplate.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 ListCertificateTemplatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesResponse} ListCertificateTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCertificateTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCertificateTemplatesResponse message. + * @function verify + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCertificateTemplatesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateTemplates != null && message.hasOwnProperty("certificateTemplates")) { + if (!Array.isArray(message.certificateTemplates)) + return "certificateTemplates: array expected"; + for (var i = 0; i < message.certificateTemplates.length; ++i) { + var error = $root.google.cloud.security.privateca.v1.CertificateTemplate.verify(message.certificateTemplates[i]); + if (error) + return "certificateTemplates." + 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 ListCertificateTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.ListCertificateTemplatesResponse} ListCertificateTemplatesResponse + */ + ListCertificateTemplatesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse) + return object; + var message = new $root.google.cloud.security.privateca.v1.ListCertificateTemplatesResponse(); + if (object.certificateTemplates) { + if (!Array.isArray(object.certificateTemplates)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.certificateTemplates: array expected"); + message.certificateTemplates = []; + for (var i = 0; i < object.certificateTemplates.length; ++i) { + if (typeof object.certificateTemplates[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.certificateTemplates: object expected"); + message.certificateTemplates[i] = $root.google.cloud.security.privateca.v1.CertificateTemplate.fromObject(object.certificateTemplates[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.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 ListCertificateTemplatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {google.cloud.security.privateca.v1.ListCertificateTemplatesResponse} message ListCertificateTemplatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCertificateTemplatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.certificateTemplates = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.certificateTemplates && message.certificateTemplates.length) { + object.certificateTemplates = []; + for (var j = 0; j < message.certificateTemplates.length; ++j) + object.certificateTemplates[j] = $root.google.cloud.security.privateca.v1.CertificateTemplate.toObject(message.certificateTemplates[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 ListCertificateTemplatesResponse to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListCertificateTemplatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ListCertificateTemplatesResponse; + })(); + + v1.UpdateCertificateTemplateRequest = (function() { + + /** + * Properties of an UpdateCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @interface IUpdateCertificateTemplateRequest + * @property {google.cloud.security.privateca.v1.ICertificateTemplate|null} [certificateTemplate] UpdateCertificateTemplateRequest certificateTemplate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCertificateTemplateRequest updateMask + * @property {string|null} [requestId] UpdateCertificateTemplateRequest requestId + */ + + /** + * Constructs a new UpdateCertificateTemplateRequest. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an UpdateCertificateTemplateRequest. + * @implements IUpdateCertificateTemplateRequest + * @constructor + * @param {google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest=} [properties] Properties to set + */ + function UpdateCertificateTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCertificateTemplateRequest certificateTemplate. + * @member {google.cloud.security.privateca.v1.ICertificateTemplate|null|undefined} certificateTemplate + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @instance + */ + UpdateCertificateTemplateRequest.prototype.certificateTemplate = null; + + /** + * UpdateCertificateTemplateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @instance + */ + UpdateCertificateTemplateRequest.prototype.updateMask = null; + + /** + * UpdateCertificateTemplateRequest requestId. + * @member {string} requestId + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @instance + */ + UpdateCertificateTemplateRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateCertificateTemplateRequest instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest} UpdateCertificateTemplateRequest instance + */ + UpdateCertificateTemplateRequest.create = function create(properties) { + return new UpdateCertificateTemplateRequest(properties); + }; + + /** + * Encodes the specified UpdateCertificateTemplateRequest message. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest} message UpdateCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.certificateTemplate != null && Object.hasOwnProperty.call(message, "certificateTemplate")) + $root.google.cloud.security.privateca.v1.CertificateTemplate.encode(message.certificateTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateCertificateTemplateRequest message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest} message UpdateCertificateTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCertificateTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCertificateTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest} UpdateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateTemplateRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.requestId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateCertificateTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest} UpdateCertificateTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCertificateTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCertificateTemplateRequest message. + * @function verify + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCertificateTemplateRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) { + var error = $root.google.cloud.security.privateca.v1.CertificateTemplate.verify(message.certificateTemplate); + if (error) + return "certificateTemplate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateCertificateTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest} UpdateCertificateTemplateRequest + */ + UpdateCertificateTemplateRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest) + return object; + var message = new $root.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest(); + if (object.certificateTemplate != null) { + if (typeof object.certificateTemplate !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest.certificateTemplate: object expected"); + message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.fromObject(object.certificateTemplate); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateCertificateTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest} message UpdateCertificateTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCertificateTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.certificateTemplate = null; + object.updateMask = null; + object.requestId = ""; + } + if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) + object.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.toObject(message.certificateTemplate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateCertificateTemplateRequest to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCertificateTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UpdateCertificateTemplateRequest; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.security.privateca.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusMessage] OperationMetadata statusMessage + * @property {boolean|null} [requestedCancellation] OperationMetadata requestedCancellation + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.security.privateca.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.security.privateca.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusMessage = ""; + + /** + * OperationMetadata requestedCancellation. + * @member {boolean} requestedCancellation + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.requestedCancellation = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.security.privateca.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusMessage); + if (message.requestedCancellation != null && Object.hasOwnProperty.call(message, "requestedCancellation")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.requestedCancellation); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.target = reader.string(); + break; + case 4: + message.verb = reader.string(); + break; + case 5: + message.statusMessage = reader.string(); + break; + case 6: + message.requestedCancellation = reader.bool(); + break; + case 7: + message.apiVersion = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + if (typeof message.requestedCancellation !== "boolean") + return "requestedCancellation: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.security.privateca.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.requestedCancellation != null) + message.requestedCancellation = Boolean(object.requestedCancellation); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {google.cloud.security.privateca.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusMessage = ""; + object.requestedCancellation = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.requestedCancellation != null && message.hasOwnProperty("requestedCancellation")) + object.requestedCancellation = message.requestedCancellation; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OperationMetadata; + })(); + + return v1; + })(); + + privateca.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.security.privateca + * @namespace + */ + var v1beta1 = {}; + + v1beta1.CertificateAuthority = (function() { + + /** + * Properties of a CertificateAuthority. + * @memberof google.cloud.security.privateca.v1beta1 + * @interface ICertificateAuthority + * @property {string|null} [name] CertificateAuthority name + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.Type|null} [type] CertificateAuthority type + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier|null} [tier] CertificateAuthority tier + * @property {google.cloud.security.privateca.v1beta1.ICertificateConfig|null} [config] CertificateAuthority config + * @property {google.protobuf.IDuration|null} [lifetime] CertificateAuthority lifetime + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null} [keySpec] CertificateAuthority keySpec + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null} [certificatePolicy] CertificateAuthority certificatePolicy + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null} [issuingOptions] CertificateAuthority issuingOptions + * @property {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null} [subordinateConfig] CertificateAuthority subordinateConfig + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.State|null} [state] CertificateAuthority state + * @property {Array.|null} [pemCaCertificates] CertificateAuthority pemCaCertificates + * @property {Array.|null} [caCertificateDescriptions] CertificateAuthority caCertificateDescriptions + * @property {string|null} [gcsBucket] CertificateAuthority gcsBucket + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null} [accessUrls] CertificateAuthority accessUrls + * @property {google.protobuf.ITimestamp|null} [createTime] CertificateAuthority createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] CertificateAuthority updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] CertificateAuthority deleteTime + * @property {Object.|null} [labels] CertificateAuthority labels + */ + + /** + * Constructs a new CertificateAuthority. + * @memberof google.cloud.security.privateca.v1beta1 + * @classdesc Represents a CertificateAuthority. + * @implements ICertificateAuthority + * @constructor + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority=} [properties] Properties to set + */ + function CertificateAuthority(properties) { + this.pemCaCertificates = []; + this.caCertificateDescriptions = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateAuthority name. + * @member {string} name + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.name = ""; + + /** + * CertificateAuthority type. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.Type} type + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.type = 0; + + /** + * CertificateAuthority tier. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier} tier + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.tier = 0; + + /** + * CertificateAuthority config. + * @member {google.cloud.security.privateca.v1beta1.ICertificateConfig|null|undefined} config + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.config = null; + + /** + * CertificateAuthority lifetime. + * @member {google.protobuf.IDuration|null|undefined} lifetime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.lifetime = null; + + /** + * CertificateAuthority keySpec. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec|null|undefined} keySpec + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.keySpec = null; + + /** + * CertificateAuthority certificatePolicy. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy|null|undefined} certificatePolicy + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.certificatePolicy = null; + + /** + * CertificateAuthority issuingOptions. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions|null|undefined} issuingOptions + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.issuingOptions = null; + + /** + * CertificateAuthority subordinateConfig. + * @member {google.cloud.security.privateca.v1beta1.ISubordinateConfig|null|undefined} subordinateConfig + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.subordinateConfig = null; + + /** + * CertificateAuthority state. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.State} state + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.state = 0; + + /** + * CertificateAuthority pemCaCertificates. + * @member {Array.} pemCaCertificates + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.pemCaCertificates = $util.emptyArray; + + /** + * CertificateAuthority caCertificateDescriptions. + * @member {Array.} caCertificateDescriptions + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.caCertificateDescriptions = $util.emptyArray; + + /** + * CertificateAuthority gcsBucket. + * @member {string} gcsBucket + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.gcsBucket = ""; + + /** + * CertificateAuthority accessUrls. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.IAccessUrls|null|undefined} accessUrls + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.accessUrls = null; + + /** + * CertificateAuthority createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.createTime = null; + + /** + * CertificateAuthority updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.updateTime = null; + + /** + * CertificateAuthority deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.deleteTime = null; + + /** + * CertificateAuthority labels. + * @member {Object.} labels + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + */ + CertificateAuthority.prototype.labels = $util.emptyObject; + + /** + * Creates a new CertificateAuthority instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority instance + */ + CertificateAuthority.create = function create(properties) { + return new CertificateAuthority(properties); + }; + + /** + * Encodes the specified CertificateAuthority message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority} message CertificateAuthority message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthority.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.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.tier != null && Object.hasOwnProperty.call(message, "tier")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.tier); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.security.privateca.v1beta1.CertificateConfig.encode(message.config, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lifetime != null && Object.hasOwnProperty.call(message, "lifetime")) + $root.google.protobuf.Duration.encode(message.lifetime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.keySpec != null && Object.hasOwnProperty.call(message, "keySpec")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.encode(message.keySpec, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.certificatePolicy != null && Object.hasOwnProperty.call(message, "certificatePolicy")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.encode(message.certificatePolicy, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.issuingOptions != null && Object.hasOwnProperty.call(message, "issuingOptions")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.encode(message.issuingOptions, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.pemCaCertificates != null && message.pemCaCertificates.length) + for (var i = 0; i < message.pemCaCertificates.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pemCaCertificates[i]); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.state); + if (message.caCertificateDescriptions != null && message.caCertificateDescriptions.length) + for (var i = 0; i < message.caCertificateDescriptions.length; ++i) + $root.google.cloud.security.privateca.v1beta1.CertificateDescription.encode(message.caCertificateDescriptions[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.gcsBucket != null && Object.hasOwnProperty.call(message, "gcsBucket")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.gcsBucket); + if (message.accessUrls != null && Object.hasOwnProperty.call(message, "accessUrls")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.encode(message.accessUrls, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 17, wireType 2 =*/138).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 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.subordinateConfig != null && Object.hasOwnProperty.call(message, "subordinateConfig")) + $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.encode(message.subordinateConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CertificateAuthority message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.ICertificateAuthority} message CertificateAuthority message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthority.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthority.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.type = reader.int32(); + break; + case 3: + message.tier = reader.int32(); + break; + case 4: + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); + break; + case 5: + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 6: + message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); + break; + case 7: + message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.decode(reader, reader.uint32()); + break; + case 8: + message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.decode(reader, reader.uint32()); + break; + case 19: + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); + break; + case 10: + message.state = reader.int32(); + break; + case 9: + if (!(message.pemCaCertificates && message.pemCaCertificates.length)) + message.pemCaCertificates = []; + message.pemCaCertificates.push(reader.string()); + break; + case 12: + if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) + message.caCertificateDescriptions = []; + message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32())); + break; + case 13: + message.gcsBucket = reader.string(); + break; + case 14: + message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); + break; + case 15: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 16: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 17: + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 18: + 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; + } + } + return message; + }; + + /** + * Decodes a CertificateAuthority message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CertificateAuthority.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CertificateAuthority message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CertificateAuthority.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.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.tier != null && message.hasOwnProperty("tier")) + switch (message.tier) { + default: + return "tier: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.lifetime != null && message.hasOwnProperty("lifetime")) { + var error = $root.google.protobuf.Duration.verify(message.lifetime); + if (error) + return "lifetime." + error; + } + if (message.keySpec != null && message.hasOwnProperty("keySpec")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.verify(message.keySpec); + if (error) + return "keySpec." + error; + } + if (message.certificatePolicy != null && message.hasOwnProperty("certificatePolicy")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify(message.certificatePolicy); + if (error) + return "certificatePolicy." + error; + } + if (message.issuingOptions != null && message.hasOwnProperty("issuingOptions")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify(message.issuingOptions); + if (error) + return "issuingOptions." + error; + } + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) { + var error = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.verify(message.subordinateConfig); + if (error) + return "subordinateConfig." + 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.pemCaCertificates != null && message.hasOwnProperty("pemCaCertificates")) { + if (!Array.isArray(message.pemCaCertificates)) + return "pemCaCertificates: array expected"; + for (var i = 0; i < message.pemCaCertificates.length; ++i) + if (!$util.isString(message.pemCaCertificates[i])) + return "pemCaCertificates: string[] expected"; + } + if (message.caCertificateDescriptions != null && message.hasOwnProperty("caCertificateDescriptions")) { + if (!Array.isArray(message.caCertificateDescriptions)) + return "caCertificateDescriptions: array expected"; + for (var i = 0; i < message.caCertificateDescriptions.length; ++i) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.verify(message.caCertificateDescriptions[i]); + if (error) + return "caCertificateDescriptions." + error; + } + } + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) + if (!$util.isString(message.gcsBucket)) + return "gcsBucket: string expected"; + if (message.accessUrls != null && message.hasOwnProperty("accessUrls")) { + var error = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.verify(message.accessUrls); + if (error) + return "accessUrls." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + 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; + }; + + /** + * Creates a CertificateAuthority message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority} CertificateAuthority + */ + CertificateAuthority.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "SELF_SIGNED": + case 1: + message.type = 1; + break; + case "SUBORDINATE": + case 2: + message.type = 2; + break; + } + switch (object.tier) { + case "TIER_UNSPECIFIED": + case 0: + message.tier = 0; + break; + case "ENTERPRISE": + case 1: + message.tier = 1; + break; + case "DEVOPS": + case 2: + message.tier = 2; + break; + } + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.config: object expected"); + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.fromObject(object.config); + } + if (object.lifetime != null) { + if (typeof object.lifetime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.lifetime: object expected"); + message.lifetime = $root.google.protobuf.Duration.fromObject(object.lifetime); + } + if (object.keySpec != null) { + if (typeof object.keySpec !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.keySpec: object expected"); + message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.fromObject(object.keySpec); + } + if (object.certificatePolicy != null) { + if (typeof object.certificatePolicy !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.certificatePolicy: object expected"); + message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.fromObject(object.certificatePolicy); + } + if (object.issuingOptions != null) { + if (typeof object.issuingOptions !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.issuingOptions: object expected"); + message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.fromObject(object.issuingOptions); + } + if (object.subordinateConfig != null) { + if (typeof object.subordinateConfig !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.subordinateConfig: object expected"); + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.fromObject(object.subordinateConfig); + } + switch (object.state) { + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ENABLED": + case 1: + message.state = 1; + break; + case "DISABLED": + case 2: + message.state = 2; + break; + case "PENDING_ACTIVATION": + case 3: + message.state = 3; + break; + case "PENDING_DELETION": + case 4: + message.state = 4; + break; + } + if (object.pemCaCertificates) { + if (!Array.isArray(object.pemCaCertificates)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.pemCaCertificates: array expected"); + message.pemCaCertificates = []; + for (var i = 0; i < object.pemCaCertificates.length; ++i) + message.pemCaCertificates[i] = String(object.pemCaCertificates[i]); + } + if (object.caCertificateDescriptions) { + if (!Array.isArray(object.caCertificateDescriptions)) + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.caCertificateDescriptions: array expected"); + message.caCertificateDescriptions = []; + for (var i = 0; i < object.caCertificateDescriptions.length; ++i) { + if (typeof object.caCertificateDescriptions[i] !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.caCertificateDescriptions: object expected"); + message.caCertificateDescriptions[i] = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.fromObject(object.caCertificateDescriptions[i]); + } + } + if (object.gcsBucket != null) + message.gcsBucket = String(object.gcsBucket); + if (object.accessUrls != null) { + if (typeof object.accessUrls !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.accessUrls: object expected"); + message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.fromObject(object.accessUrls); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.security.privateca.v1beta1.CertificateAuthority.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; + }; + + /** + * Creates a plain object from a CertificateAuthority message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} message CertificateAuthority + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CertificateAuthority.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pemCaCertificates = []; + object.caCertificateDescriptions = []; + } + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.tier = options.enums === String ? "TIER_UNSPECIFIED" : 0; + object.config = null; + object.lifetime = null; + object.keySpec = null; + object.certificatePolicy = null; + object.issuingOptions = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.gcsBucket = ""; + object.accessUrls = null; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.subordinateConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type[message.type] : message.type; + if (message.tier != null && message.hasOwnProperty("tier")) + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier[message.tier] : message.tier; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.toObject(message.config, options); + if (message.lifetime != null && message.hasOwnProperty("lifetime")) + object.lifetime = $root.google.protobuf.Duration.toObject(message.lifetime, options); + if (message.keySpec != null && message.hasOwnProperty("keySpec")) + object.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.toObject(message.keySpec, options); + if (message.certificatePolicy != null && message.hasOwnProperty("certificatePolicy")) + object.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.toObject(message.certificatePolicy, options); + if (message.issuingOptions != null && message.hasOwnProperty("issuingOptions")) + object.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.toObject(message.issuingOptions, options); + if (message.pemCaCertificates && message.pemCaCertificates.length) { + object.pemCaCertificates = []; + for (var j = 0; j < message.pemCaCertificates.length; ++j) + object.pemCaCertificates[j] = message.pemCaCertificates[j]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.State[message.state] : message.state; + if (message.caCertificateDescriptions && message.caCertificateDescriptions.length) { + object.caCertificateDescriptions = []; + for (var j = 0; j < message.caCertificateDescriptions.length; ++j) + object.caCertificateDescriptions[j] = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.toObject(message.caCertificateDescriptions[j], options); + } + if (message.gcsBucket != null && message.hasOwnProperty("gcsBucket")) + object.gcsBucket = message.gcsBucket; + if (message.accessUrls != null && message.hasOwnProperty("accessUrls")) + object.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.toObject(message.accessUrls, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, 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]]; + } + if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) + object.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.toObject(message.subordinateConfig, options); + return object; + }; + + /** + * Converts this CertificateAuthority to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @instance + * @returns {Object.} JSON object + */ + CertificateAuthority.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + CertificateAuthority.IssuingOptions = (function() { + + /** + * Properties of an IssuingOptions. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @interface IIssuingOptions + * @property {boolean|null} [includeCaCertUrl] IssuingOptions includeCaCertUrl + * @property {boolean|null} [includeCrlAccessUrl] IssuingOptions includeCrlAccessUrl + */ + + /** + * Constructs a new IssuingOptions. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @classdesc Represents an IssuingOptions. + * @implements IIssuingOptions + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions=} [properties] Properties to set + */ + function IssuingOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssuingOptions includeCaCertUrl. + * @member {boolean} includeCaCertUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @instance + */ + IssuingOptions.prototype.includeCaCertUrl = false; + + /** + * IssuingOptions includeCrlAccessUrl. + * @member {boolean} includeCrlAccessUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @instance + */ + IssuingOptions.prototype.includeCrlAccessUrl = false; + + /** + * Creates a new IssuingOptions instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions instance + */ + IssuingOptions.create = function create(properties) { + return new IssuingOptions(properties); + }; + + /** + * Encodes the specified IssuingOptions message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions} message IssuingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuingOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeCaCertUrl != null && Object.hasOwnProperty.call(message, "includeCaCertUrl")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.includeCaCertUrl); + if (message.includeCrlAccessUrl != null && Object.hasOwnProperty.call(message, "includeCrlAccessUrl")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeCrlAccessUrl); + return writer; + }; + + /** + * Encodes the specified IssuingOptions message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IIssuingOptions} message IssuingOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssuingOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuingOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.includeCaCertUrl = reader.bool(); + break; + case 2: + message.includeCrlAccessUrl = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssuingOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssuingOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssuingOptions message. + * @function verify + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssuingOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.includeCaCertUrl != null && message.hasOwnProperty("includeCaCertUrl")) + if (typeof message.includeCaCertUrl !== "boolean") + return "includeCaCertUrl: boolean expected"; + if (message.includeCrlAccessUrl != null && message.hasOwnProperty("includeCrlAccessUrl")) + if (typeof message.includeCrlAccessUrl !== "boolean") + return "includeCrlAccessUrl: boolean expected"; + return null; + }; + + /** + * Creates an IssuingOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} IssuingOptions + */ + IssuingOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions) + return object; + var message = new $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions(); + if (object.includeCaCertUrl != null) + message.includeCaCertUrl = Boolean(object.includeCaCertUrl); + if (object.includeCrlAccessUrl != null) + message.includeCrlAccessUrl = Boolean(object.includeCrlAccessUrl); + return message; + }; + + /** + * Creates a plain object from an IssuingOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions} message IssuingOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssuingOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.includeCaCertUrl = false; + object.includeCrlAccessUrl = false; + } + if (message.includeCaCertUrl != null && message.hasOwnProperty("includeCaCertUrl")) + object.includeCaCertUrl = message.includeCaCertUrl; + if (message.includeCrlAccessUrl != null && message.hasOwnProperty("includeCrlAccessUrl")) + object.includeCrlAccessUrl = message.includeCrlAccessUrl; + return object; + }; + + /** + * Converts this IssuingOptions to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @instance + * @returns {Object.} JSON object + */ + IssuingOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IssuingOptions; + })(); + + CertificateAuthority.CertificateAuthorityPolicy = (function() { + + /** + * Properties of a CertificateAuthorityPolicy. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @interface ICertificateAuthorityPolicy + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null} [allowedConfigList] CertificateAuthorityPolicy allowedConfigList + * @property {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null} [overwriteConfigValues] CertificateAuthorityPolicy overwriteConfigValues + * @property {Array.|null} [allowedLocationsAndOrganizations] CertificateAuthorityPolicy allowedLocationsAndOrganizations + * @property {Array.|null} [allowedCommonNames] CertificateAuthorityPolicy allowedCommonNames + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null} [allowedSans] CertificateAuthorityPolicy allowedSans + * @property {google.protobuf.IDuration|null} [maximumLifetime] CertificateAuthorityPolicy maximumLifetime + * @property {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null} [allowedIssuanceModes] CertificateAuthorityPolicy allowedIssuanceModes + */ + + /** + * Constructs a new CertificateAuthorityPolicy. + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @classdesc Represents a CertificateAuthorityPolicy. + * @implements ICertificateAuthorityPolicy + * @constructor + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy=} [properties] Properties to set + */ + function CertificateAuthorityPolicy(properties) { + this.allowedLocationsAndOrganizations = []; + this.allowedCommonNames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CertificateAuthorityPolicy allowedConfigList. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedConfigList|null|undefined} allowedConfigList + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedConfigList = null; + + /** + * CertificateAuthorityPolicy overwriteConfigValues. + * @member {google.cloud.security.privateca.v1beta1.IReusableConfigWrapper|null|undefined} overwriteConfigValues + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.overwriteConfigValues = null; + + /** + * CertificateAuthorityPolicy allowedLocationsAndOrganizations. + * @member {Array.} allowedLocationsAndOrganizations + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedLocationsAndOrganizations = $util.emptyArray; + + /** + * CertificateAuthorityPolicy allowedCommonNames. + * @member {Array.} allowedCommonNames + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedCommonNames = $util.emptyArray; + + /** + * CertificateAuthorityPolicy allowedSans. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IAllowedSubjectAltNames|null|undefined} allowedSans + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedSans = null; + + /** + * CertificateAuthorityPolicy maximumLifetime. + * @member {google.protobuf.IDuration|null|undefined} maximumLifetime + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.maximumLifetime = null; + + /** + * CertificateAuthorityPolicy allowedIssuanceModes. + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IIssuanceModes|null|undefined} allowedIssuanceModes + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + CertificateAuthorityPolicy.prototype.allowedIssuanceModes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CertificateAuthorityPolicy configPolicy. + * @member {"allowedConfigList"|"overwriteConfigValues"|undefined} configPolicy + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @instance + */ + Object.defineProperty(CertificateAuthorityPolicy.prototype, "configPolicy", { + get: $util.oneOfGetter($oneOfFields = ["allowedConfigList", "overwriteConfigValues"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CertificateAuthorityPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy} CertificateAuthorityPolicy instance + */ + CertificateAuthorityPolicy.create = function create(properties) { + return new CertificateAuthorityPolicy(properties); + }; + + /** + * Encodes the specified CertificateAuthorityPolicy message. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority.ICertificateAuthorityPolicy} message CertificateAuthorityPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CertificateAuthorityPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedConfigList != null && Object.hasOwnProperty.call(message, "allowedConfigList")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.encode(message.allowedConfigList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.overwriteConfigValues != null && Object.hasOwnProperty.call(message, "overwriteConfigValues")) + $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.encode(message.overwriteConfigValues, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.allowedLocationsAndOrganizations != null && message.allowedLocationsAndOrganizations.length) + for (var i = 0; i < message.allowedLocationsAndOrganizations.length; ++i) + $root.google.cloud.security.privateca.v1beta1.Subject.encode(message.allowedLocationsAndOrganizations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.allowedCommonNames != null && message.allowedCommonNames.length) + for (var i = 0; i < message.allowedCommonNames.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.allowedCommonNames[i]); + if (message.allowedSans != null && Object.hasOwnProperty.call(message, "allowedSans")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.encode(message.allowedSans, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.maximumLifetime != null && Object.hasOwnProperty.call(message, "maximumLifetime")) + $root.google.protobuf.Duration.encode(message.maximumLifetime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.allowedIssuanceModes != null && Object.hasOwnProperty.call(message, "allowedIssuanceModes")) + $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.encode(message.allowedIssuanceModes, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; /** * Encodes the specified CertificateAuthorityPolicy message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.verify|verify} messages. @@ -27157,20 +47745,468 @@ /** * Properties of a Duration. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @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.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new Duration. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function Duration(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27178,88 +48214,88 @@ } /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Any.prototype.type_url = ""; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - Duration.prototype.nanos = 0; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a new Duration instance using the specified properties. + * Creates a new Any instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Any.create = function create(properties) { + return new Any(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IDuration} message Duration 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 */ - Duration.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 Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.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.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IDuration} message Duration 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 */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Any.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes an Any message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.Duration} Duration + * @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 */ - Duration.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.Duration(); + 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); @@ -27270,131 +48306,124 @@ }; /** - * Decodes a Duration 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.Duration + * @memberof google.protobuf.Any * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.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 Duration message. + * Verifies an Any message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.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 Duration 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.Duration + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Any} Any */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) 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; + 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 Duration 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.Duration + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.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 Duration to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; + return Any; })(); - protobuf.Timestamp = (function() { + protobuf.Empty = (function() { /** - * Properties of a Timestamp. + * Properties of an Empty. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IEmpty */ /** - * Constructs a new Timestamp. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function Timestamp(properties) { + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -27402,88 +48431,240 @@ } /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp + * 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 */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Timestamp.prototype.nanos = 0; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + FieldMask.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.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.seconds = reader.int64(); - break; - case 2: - message.nanos = reader.int32(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -27494,110 +48675,99 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + FieldMask.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.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.FieldMask} FieldMask */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + FieldMask.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 (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; } - 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. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Timestamp; + return FieldMask; })(); protobuf.DoubleValue = (function() { @@ -29320,242 +50490,39 @@ return BytesValue; })(); - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @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.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.Any(); - 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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @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 - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @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 - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - 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 an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - 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; - }; + return protobuf; + })(); - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + google.type = (function() { - return Any; - })(); + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; - protobuf.Empty = (function() { + type.Expr = (function() { /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty + * Properties of an Expr. + * @memberof google.type + * @interface IExpr + * @property {string|null} [expression] Expr expression + * @property {string|null} [title] Expr title + * @property {string|null} [description] Expr description + * @property {string|null} [location] Expr location */ /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * Constructs a new Expr. + * @memberof google.type + * @classdesc Represents an Expr. + * @implements IExpr * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.type.IExpr=} [properties] Properties to set */ - function Empty(properties) { + function Expr(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -29563,240 +50530,114 @@ } /** - * 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 + * Expr expression. + * @member {string} expression + * @memberof google.type.Expr * @instance - * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { + Expr.prototype.expression = ""; /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths + * Expr title. + * @member {string} title + * @memberof google.type.Expr + * @instance */ + Expr.prototype.title = ""; /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * Expr description. + * @member {string} description + * @memberof google.type.Expr + * @instance */ - function FieldMask(properties) { - this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Expr.prototype.description = ""; /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask + * Expr location. + * @member {string} location + * @memberof google.type.Expr * @instance */ - FieldMask.prototype.paths = $util.emptyArray; + Expr.prototype.location = ""; /** - * Creates a new FieldMask instance using the specified properties. + * Creates a new Expr instance using the specified properties. * @function create - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance + * @param {google.type.IExpr=} [properties] Properties to set + * @returns {google.type.Expr} Expr instance */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); + Expr.create = function create(properties) { + return new Expr(properties); }; /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Expr message. Does not implicitly {@link google.type.Expr.verify|verify} messages. * @function encode - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.type.IExpr} message Expr message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encode = function encode(message, writer) { + Expr.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + if (message.expression != null && Object.hasOwnProperty.call(message, "expression")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.expression); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.location); return writer; }; /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * Encodes the specified Expr message, length delimited. Does not implicitly {@link google.type.Expr.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {google.type.IExpr} message Expr message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + Expr.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FieldMask message from the specified reader or buffer. + * Decodes an Expr message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.type.Expr} Expr * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decode = function decode(reader, length) { + Expr.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Expr(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + message.expression = reader.string(); + break; + case 2: + message.title = reader.string(); + break; + case 3: + message.description = reader.string(); + break; + case 4: + message.location = reader.string(); break; default: reader.skipType(tag & 7); @@ -29807,102 +50648,115 @@ }; /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * Decodes an Expr message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.type.Expr} Expr * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { + Expr.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FieldMask message. + * Verifies an Expr message. * @function verify - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FieldMask.verify = function verify(message) { + Expr.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } + if (message.expression != null && message.hasOwnProperty("expression")) + if (!$util.isString(message.expression)) + return "expression: string expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; return null; }; /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * Creates an Expr message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask + * @returns {google.type.Expr} Expr */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) + Expr.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Expr) return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } + var message = new $root.google.type.Expr(); + if (object.expression != null) + message.expression = String(object.expression); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.location != null) + message.location = String(object.location); return message; }; /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * Creates a plain object from an Expr message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @static - * @param {google.protobuf.FieldMask} message FieldMask + * @param {google.type.Expr} message Expr * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldMask.toObject = function toObject(message, options) { + Expr.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } + if (options.defaults) { + object.expression = ""; + object.title = ""; + object.description = ""; + object.location = ""; + } + if (message.expression != null && message.hasOwnProperty("expression")) + object.expression = message.expression; + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; return object; }; /** - * Converts this FieldMask to JSON. + * Converts this Expr to JSON. * @function toJSON - * @memberof google.protobuf.FieldMask + * @memberof google.type.Expr * @instance * @returns {Object.} JSON object */ - FieldMask.prototype.toJSON = function toJSON() { + Expr.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldMask; + return Expr; })(); - return protobuf; + return type; })(); google.longrunning = (function() { diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 2bf6c855c57..9d90ebc7540 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -8,6 +8,2823 @@ "nested": { "privateca": { "nested": { + "v1": { + "options": { + "cc_enable_arenas": true, + "csharp_namespace": "Google.Cloud.Security.PrivateCA.V1", + "go_package": "google.golang.org/genproto/googleapis/cloud/security/privateca/v1;privateca", + "java_multiple_files": true, + "java_outer_classname": "PrivateCaProto", + "java_package": "com.google.cloud.security.privateca.v1", + "php_namespace": "Google\\Cloud\\Security\\PrivateCA\\v1", + "ruby_package": "Google::Cloud::Security::PrivateCA::v1" + }, + "nested": { + "CertificateAuthority": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/CertificateAuthority", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "Type", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "config": { + "type": "CertificateConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "lifetime": { + "type": "google.protobuf.Duration", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "keySpec": { + "type": "KeyVersionSpec", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "subordinateConfig": { + "type": "SubordinateConfig", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tier": { + "type": "CaPool.Tier", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCaCertificates": { + "rule": "repeated", + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "caCertificateDescriptions": { + "rule": "repeated", + "type": "CertificateDescription", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "gcsBucket": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "accessUrls": { + "type": "AccessUrls", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 14, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 16, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AccessUrls": { + "fields": { + "caCertificateAccessUrl": { + "type": "string", + "id": 1 + }, + "crlAccessUrls": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "KeyVersionSpec": { + "oneofs": { + "KeyVersion": { + "oneof": [ + "cloudKmsKeyVersion", + "algorithm" + ] + } + }, + "fields": { + "cloudKmsKeyVersion": { + "type": "string", + "id": 1 + }, + "algorithm": { + "type": "SignHashAlgorithm", + "id": 2 + } + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SELF_SIGNED": 1, + "SUBORDINATE": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + "STAGED": 3, + "AWAITING_USER_ACTIVATION": 4, + "DELETED": 5 + } + }, + "SignHashAlgorithm": { + "values": { + "SIGN_HASH_ALGORITHM_UNSPECIFIED": 0, + "RSA_PSS_2048_SHA256": 1, + "RSA_PSS_3072_SHA256": 2, + "RSA_PSS_4096_SHA256": 3, + "RSA_PKCS1_2048_SHA256": 6, + "RSA_PKCS1_3072_SHA256": 7, + "RSA_PKCS1_4096_SHA256": 8, + "EC_P256_SHA256": 4, + "EC_P384_SHA384": 5 + } + } + } + }, + "CaPool": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/CaPool", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/caPools/{ca_pool}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "tier": { + "type": "Tier", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "issuancePolicy": { + "type": "IssuancePolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "publishingOptions": { + "type": "PublishingOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PublishingOptions": { + "fields": { + "publishCaCert": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "publishCrl": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "IssuancePolicy": { + "fields": { + "allowedKeyTypes": { + "rule": "repeated", + "type": "AllowedKeyType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maximumLifetime": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowedIssuanceModes": { + "type": "IssuanceModes", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "baselineValues": { + "type": "X509Parameters", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "identityConstraints": { + "type": "CertificateIdentityConstraints", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "passthroughExtensions": { + "type": "CertificateExtensionConstraints", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AllowedKeyType": { + "oneofs": { + "keyType": { + "oneof": [ + "rsa", + "ellipticCurve" + ] + } + }, + "fields": { + "rsa": { + "type": "RsaKeyType", + "id": 1 + }, + "ellipticCurve": { + "type": "NamedCurve", + "id": 2 + } + }, + "nested": { + "RsaKeyType": { + "fields": { + "minModulusSize": { + "type": "int64", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxModulusSize": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NamedCurve": { + "values": { + "NAMED_CURVE_UNSPECIFIED": 0, + "ECDSA_P256": 2, + "ECDSA_P384": 3, + "EDDSA_25519": 4 + } + } + } + }, + "IssuanceModes": { + "fields": { + "allowCsrBasedIssuance": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "allowConfigBasedIssuance": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "ENTERPRISE": 1, + "DEVOPS": 2 + } + } + } + }, + "CertificateRevocationList": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/CertificateRevocationList", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sequenceNumber": { + "type": "int64", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revokedCertificates": { + "rule": "repeated", + "type": "RevokedCertificate", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCrl": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "accessUrl": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "revisionId": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RevokedCertificate": { + "fields": { + "certificate": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/Certificate" + } + }, + "hexSerialNumber": { + "type": "string", + "id": 2 + }, + "revocationReason": { + "type": "RevocationReason", + "id": 3 + } + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "SUPERSEDED": 2 + } + } + } + }, + "Certificate": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/Certificate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}" + }, + "oneofs": { + "certificateConfig": { + "oneof": [ + "pemCsr", + "config" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "privateca.googleapis.com/Certificate" + } + }, + "pemCsr": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "config": { + "type": "CertificateConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "issuerCertificateAuthority": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "lifetime": { + "type": "google.protobuf.Duration", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "certificateTemplate": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateTemplate" + } + }, + "subjectMode": { + "type": "SubjectRequestMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "revocationDetails": { + "type": "RevocationDetails", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCertificate": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "certificateDescription": { + "type": "CertificateDescription", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pemCertificateChain": { + "rule": "repeated", + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RevocationDetails": { + "fields": { + "revocationState": { + "type": "RevocationReason", + "id": 1 + }, + "revocationTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + } + } + }, + "CertificateTemplate": { + "options": { + "(google.api.resource).type": "privateca.googleapis.com/CertificateTemplate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/certificateTemplates/{certificate_template}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateTemplate" + } + }, + "predefinedValues": { + "type": "X509Parameters", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "identityConstraints": { + "type": "CertificateIdentityConstraints", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "passthroughExtensions": { + "type": "CertificateExtensionConstraints", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "X509Parameters": { + "fields": { + "keyUsage": { + "type": "KeyUsage", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "caOptions": { + "type": "CaOptions", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "policyIds": { + "rule": "repeated", + "type": "ObjectId", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "aiaOcspServers": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "additionalExtensions": { + "rule": "repeated", + "type": "X509Extension", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "CaOptions": { + "fields": { + "isCa": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxIssuerPathLength": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SubordinateConfig": { + "oneofs": { + "subordinateConfig": { + "oneof": [ + "certificateAuthority", + "pemIssuerChain" + ] + } + }, + "fields": { + "certificateAuthority": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "pemIssuerChain": { + "type": "SubordinateConfigChain", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "SubordinateConfigChain": { + "fields": { + "pemCertificates": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "PublicKey": { + "fields": { + "key": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "format": { + "type": "KeyFormat", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "KeyFormat": { + "values": { + "KEY_FORMAT_UNSPECIFIED": 0, + "PEM": 1 + } + } + } + }, + "CertificateConfig": { + "fields": { + "subjectConfig": { + "type": "SubjectConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "x509Config": { + "type": "X509Parameters", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "publicKey": { + "type": "PublicKey", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SubjectConfig": { + "fields": { + "subject": { + "type": "Subject", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "subjectAltName": { + "type": "SubjectAltNames", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "CertificateDescription": { + "fields": { + "subjectDescription": { + "type": "SubjectDescription", + "id": 1 + }, + "x509Description": { + "type": "X509Parameters", + "id": 2 + }, + "publicKey": { + "type": "PublicKey", + "id": 3 + }, + "subjectKeyId": { + "type": "KeyId", + "id": 4 + }, + "authorityKeyId": { + "type": "KeyId", + "id": 5 + }, + "crlDistributionPoints": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "aiaIssuingCertificateUrls": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "certFingerprint": { + "type": "CertificateFingerprint", + "id": 8 + } + }, + "nested": { + "SubjectDescription": { + "fields": { + "subject": { + "type": "Subject", + "id": 1 + }, + "subjectAltName": { + "type": "SubjectAltNames", + "id": 2 + }, + "hexSerialNumber": { + "type": "string", + "id": 3 + }, + "lifetime": { + "type": "google.protobuf.Duration", + "id": 4 + }, + "notBeforeTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "notAfterTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + }, + "KeyId": { + "fields": { + "keyId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CertificateFingerprint": { + "fields": { + "sha256Hash": { + "type": "string", + "id": 1 + } + } + } + } + }, + "ObjectId": { + "fields": { + "objectIdPath": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "X509Extension": { + "fields": { + "objectId": { + "type": "ObjectId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "critical": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "bytes", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "KeyUsage": { + "fields": { + "baseKeyUsage": { + "type": "KeyUsageOptions", + "id": 1 + }, + "extendedKeyUsage": { + "type": "ExtendedKeyUsageOptions", + "id": 2 + }, + "unknownExtendedKeyUsages": { + "rule": "repeated", + "type": "ObjectId", + "id": 3 + } + }, + "nested": { + "KeyUsageOptions": { + "fields": { + "digitalSignature": { + "type": "bool", + "id": 1 + }, + "contentCommitment": { + "type": "bool", + "id": 2 + }, + "keyEncipherment": { + "type": "bool", + "id": 3 + }, + "dataEncipherment": { + "type": "bool", + "id": 4 + }, + "keyAgreement": { + "type": "bool", + "id": 5 + }, + "certSign": { + "type": "bool", + "id": 6 + }, + "crlSign": { + "type": "bool", + "id": 7 + }, + "encipherOnly": { + "type": "bool", + "id": 8 + }, + "decipherOnly": { + "type": "bool", + "id": 9 + } + } + }, + "ExtendedKeyUsageOptions": { + "fields": { + "serverAuth": { + "type": "bool", + "id": 1 + }, + "clientAuth": { + "type": "bool", + "id": 2 + }, + "codeSigning": { + "type": "bool", + "id": 3 + }, + "emailProtection": { + "type": "bool", + "id": 4 + }, + "timeStamping": { + "type": "bool", + "id": 5 + }, + "ocspSigning": { + "type": "bool", + "id": 6 + } + } + } + } + }, + "Subject": { + "fields": { + "commonName": { + "type": "string", + "id": 1 + }, + "countryCode": { + "type": "string", + "id": 2 + }, + "organization": { + "type": "string", + "id": 3 + }, + "organizationalUnit": { + "type": "string", + "id": 4 + }, + "locality": { + "type": "string", + "id": 5 + }, + "province": { + "type": "string", + "id": 6 + }, + "streetAddress": { + "type": "string", + "id": 7 + }, + "postalCode": { + "type": "string", + "id": 8 + } + } + }, + "SubjectAltNames": { + "fields": { + "dnsNames": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "uris": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "emailAddresses": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "ipAddresses": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "customSans": { + "rule": "repeated", + "type": "X509Extension", + "id": 5 + } + } + }, + "CertificateIdentityConstraints": { + "fields": { + "celExpression": { + "type": "google.type.Expr", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowSubjectPassthrough": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "allowSubjectAltNamesPassthrough": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CertificateExtensionConstraints": { + "fields": { + "knownExtensions": { + "rule": "repeated", + "type": "KnownCertificateExtension", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "additionalExtensions": { + "rule": "repeated", + "type": "ObjectId", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "KnownCertificateExtension": { + "values": { + "KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED": 0, + "BASE_KEY_USAGE": 1, + "EXTENDED_KEY_USAGE": 2, + "CA_OPTIONS": 3, + "POLICY_IDS": 4, + "AIA_OCSP_SERVERS": 5 + } + } + } + }, + "RevocationReason": { + "values": { + "REVOCATION_REASON_UNSPECIFIED": 0, + "KEY_COMPROMISE": 1, + "CERTIFICATE_AUTHORITY_COMPROMISE": 2, + "AFFILIATION_CHANGED": 3, + "SUPERSEDED": 4, + "CESSATION_OF_OPERATION": 5, + "CERTIFICATE_HOLD": 6, + "PRIVILEGE_WITHDRAWN": 7, + "ATTRIBUTE_AUTHORITY_COMPROMISE": 8 + } + }, + "SubjectRequestMode": { + "values": { + "SUBJECT_REQUEST_MODE_UNSPECIFIED": 0, + "DEFAULT": 1, + "REFLECTED_SPIFFE": 2 + } + }, + "CertificateAuthorityService": { + "options": { + "(google.api.default_host)": "privateca.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateCertificate": { + "requestType": "CreateCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/caPools/*}/certificates", + "(google.api.http).body": "certificate", + "(google.api.method_signature)": "parent,certificate,certificate_id" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/caPools/*}/certificates", + "body": "certificate" + } + }, + { + "(google.api.method_signature)": "parent,certificate,certificate_id" + } + ] + }, + "GetCertificate": { + "requestType": "GetCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/caPools/*/certificates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/caPools/*/certificates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCertificates": { + "requestType": "ListCertificatesRequest", + "responseType": "ListCertificatesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/caPools/*}/certificates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/caPools/*}/certificates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "RevokeCertificate": { + "requestType": "RevokeCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/caPools/*/certificates/*}:revoke", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateCertificate": { + "requestType": "UpdateCertificateRequest", + "responseType": "Certificate", + "options": { + "(google.api.http).patch": "/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}", + "(google.api.http).body": "certificate", + "(google.api.method_signature)": "certificate,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{certificate.name=projects/*/locations/*/caPools/*/certificates/*}", + "body": "certificate" + } + }, + { + "(google.api.method_signature)": "certificate,update_mask" + } + ] + }, + "ActivateCertificateAuthority": { + "requestType": "ActivateCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateCertificateAuthority": { + "requestType": "CreateCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities", + "(google.api.http).body": "certificate_authority", + "(google.api.method_signature)": "parent,certificate_authority,certificate_authority_id", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities", + "body": "certificate_authority" + } + }, + { + "(google.api.method_signature)": "parent,certificate_authority,certificate_authority_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DisableCertificateAuthority": { + "requestType": "DisableCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "EnableCertificateAuthority": { + "requestType": "EnableCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FetchCertificateAuthorityCsr": { + "requestType": "FetchCertificateAuthorityCsrRequest", + "responseType": "FetchCertificateAuthorityCsrResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetCertificateAuthority": { + "requestType": "GetCertificateAuthorityRequest", + "responseType": "CertificateAuthority", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCertificateAuthorities": { + "requestType": "ListCertificateAuthoritiesRequest", + "responseType": "ListCertificateAuthoritiesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UndeleteCertificateAuthority": { + "requestType": "UndeleteCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteCertificateAuthority": { + "requestType": "DeleteCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateCertificateAuthority": { + "requestType": "UpdateCertificateAuthorityRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}", + "(google.api.http).body": "certificate_authority", + "(google.api.method_signature)": "certificate_authority,update_mask", + "(google.longrunning.operation_info).response_type": "CertificateAuthority", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}", + "body": "certificate_authority" + } + }, + { + "(google.api.method_signature)": "certificate_authority,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateAuthority", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateCaPool": { + "requestType": "CreateCaPoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/caPools", + "(google.api.http).body": "ca_pool", + "(google.api.method_signature)": "parent,ca_pool,ca_pool_id", + "(google.longrunning.operation_info).response_type": "CaPool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/caPools", + "body": "ca_pool" + } + }, + { + "(google.api.method_signature)": "parent,ca_pool,ca_pool_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CaPool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateCaPool": { + "requestType": "UpdateCaPoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{ca_pool.name=projects/*/locations/*/caPools/*}", + "(google.api.http).body": "ca_pool", + "(google.api.method_signature)": "ca_pool,update_mask", + "(google.longrunning.operation_info).response_type": "CaPool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{ca_pool.name=projects/*/locations/*/caPools/*}", + "body": "ca_pool" + } + }, + { + "(google.api.method_signature)": "ca_pool,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CaPool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetCaPool": { + "requestType": "GetCaPoolRequest", + "responseType": "CaPool", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/caPools/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/caPools/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCaPools": { + "requestType": "ListCaPoolsRequest", + "responseType": "ListCaPoolsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/caPools", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/caPools" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteCaPool": { + "requestType": "DeleteCaPoolRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/caPools/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "CaPool", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/caPools/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CaPool", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "FetchCaCerts": { + "requestType": "FetchCaCertsRequest", + "responseType": "FetchCaCertsResponse", + "options": { + "(google.api.http).post": "/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts", + "(google.api.http).body": "*", + "(google.api.method_signature)": "ca_pool" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{ca_pool=projects/*/locations/*/caPools/*}:fetchCaCerts", + "body": "*" + } + }, + { + "(google.api.method_signature)": "ca_pool" + } + ] + }, + "GetCertificateRevocationList": { + "requestType": "GetCertificateRevocationListRequest", + "responseType": "CertificateRevocationList", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCertificateRevocationLists": { + "requestType": "ListCertificateRevocationListsRequest", + "responseType": "ListCertificateRevocationListsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateCertificateRevocationList": { + "requestType": "UpdateCertificateRevocationListRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}", + "(google.api.http).body": "certificate_revocation_list", + "(google.api.method_signature)": "certificate_revocation_list,update_mask", + "(google.longrunning.operation_info).response_type": "CertificateRevocationList", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}", + "body": "certificate_revocation_list" + } + }, + { + "(google.api.method_signature)": "certificate_revocation_list,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateRevocationList", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateCertificateTemplate": { + "requestType": "CreateCertificateTemplateRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/certificateTemplates", + "(google.api.http).body": "certificate_template", + "(google.api.method_signature)": "parent,certificate_template,certificate_template_id", + "(google.longrunning.operation_info).response_type": "CertificateTemplate", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/certificateTemplates", + "body": "certificate_template" + } + }, + { + "(google.api.method_signature)": "parent,certificate_template,certificate_template_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateTemplate", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteCertificateTemplate": { + "requestType": "DeleteCertificateTemplateRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/certificateTemplates/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.security.privateca.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/certificateTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.security.privateca.v1.OperationMetadata" + } + } + ] + }, + "GetCertificateTemplate": { + "requestType": "GetCertificateTemplateRequest", + "responseType": "CertificateTemplate", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/certificateTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/certificateTemplates/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListCertificateTemplates": { + "requestType": "ListCertificateTemplatesRequest", + "responseType": "ListCertificateTemplatesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/certificateTemplates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/certificateTemplates" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateCertificateTemplate": { + "requestType": "UpdateCertificateTemplateRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}", + "(google.api.http).body": "certificate_template", + "(google.api.method_signature)": "certificate_template,update_mask", + "(google.longrunning.operation_info).response_type": "CertificateTemplate", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}", + "body": "certificate_template" + } + }, + { + "(google.api.method_signature)": "certificate_template,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "CertificateTemplate", + "metadata_type": "OperationMetadata" + } + } + ] + } + } + }, + "CreateCertificateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "certificateId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "certificate": { + "type": "Certificate", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "validateOnly": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "issuingCertificateAuthorityId": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetCertificateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/Certificate" + } + } + } + }, + "ListCertificatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificatesResponse": { + "fields": { + "certificates": { + "rule": "repeated", + "type": "Certificate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "RevokeCertificateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/Certificate" + } + }, + "reason": { + "type": "RevocationReason", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateCertificateRequest": { + "fields": { + "certificate": { + "type": "Certificate", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ActivateCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "pemCaCertificate": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "subordinateConfig": { + "type": "SubordinateConfig", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateCertificateAuthorityRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "certificateAuthorityId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "certificateAuthority": { + "type": "CertificateAuthority", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DisableCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EnableCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchCertificateAuthorityCsrRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + } + } + }, + "FetchCertificateAuthorityCsrResponse": { + "fields": { + "pemCsr": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + } + } + }, + "ListCertificateAuthoritiesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificateAuthoritiesResponse": { + "fields": { + "certificateAuthorities": { + "rule": "repeated", + "type": "CertificateAuthority", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UndeleteCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteCertificateAuthorityRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ignoreActiveCertificates": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateCertificateAuthorityRequest": { + "fields": { + "certificateAuthority": { + "type": "CertificateAuthority", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateCaPoolRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "caPoolId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "caPool": { + "type": "CaPool", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateCaPoolRequest": { + "fields": { + "caPool": { + "type": "CaPool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteCaPoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchCaCertsRequest": { + "fields": { + "caPool": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FetchCaCertsResponse": { + "fields": { + "caCerts": { + "rule": "repeated", + "type": "CertChain", + "id": 1 + } + }, + "nested": { + "CertChain": { + "fields": { + "certificates": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "GetCaPoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + } + } + }, + "ListCaPoolsRequest": { + "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, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCaPoolsResponse": { + "fields": { + "caPools": { + "rule": "repeated", + "type": "CaPool", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GetCertificateRevocationListRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateRevocationList" + } + } + } + }, + "ListCertificateRevocationListsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateAuthority" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificateRevocationListsResponse": { + "fields": { + "certificateRevocationLists": { + "rule": "repeated", + "type": "CertificateRevocationList", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateCertificateRevocationListRequest": { + "fields": { + "certificateRevocationList": { + "type": "CertificateRevocationList", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CreateCertificateTemplateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "certificateTemplateId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "certificateTemplate": { + "type": "CertificateTemplate", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteCertificateTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateTemplate" + } + }, + "requestId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetCertificateTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "privateca.googleapis.com/CertificateTemplate" + } + } + } + }, + "ListCertificateTemplatesRequest": { + "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, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListCertificateTemplatesResponse": { + "fields": { + "certificateTemplates": { + "rule": "repeated", + "type": "CertificateTemplate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "UpdateCertificateTemplateRequest": { + "fields": { + "certificateTemplate": { + "type": "CertificateTemplate", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "requestId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OperationMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "target": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "verb": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestedCancellation": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "apiVersion": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + }, "v1beta1": { "options": { "cc_enable_arenas": true, @@ -3372,6 +6189,30 @@ } } }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, "DoubleValue": { "fields": { "value": { @@ -3443,28 +6284,35 @@ "id": 1 } } - }, - "Any": { + } + } + }, + "type": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/type/expr;expr", + "java_multiple_files": true, + "java_outer_classname": "ExprProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Expr": { "fields": { - "type_url": { + "expression": { "type": "string", "id": 1 }, - "value": { - "type": "bytes", + "title": { + "type": "string", "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", + }, + "description": { "type": "string", - "id": 1 + "id": 3 + }, + "location": { + "type": "string", + "id": 4 } } } diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index 4759622d6aa..41bc2880a11 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/src/index.ts @@ -16,13 +16,14 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** +import * as v1 from './v1'; import * as v1beta1 from './v1beta1'; const CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; type CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; -export {v1beta1, CertificateAuthorityServiceClient}; -export default {v1beta1, CertificateAuthorityServiceClient}; +export {v1, v1beta1, CertificateAuthorityServiceClient}; +export default {v1, v1beta1, CertificateAuthorityServiceClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts new file mode 100644 index 00000000000..16e8c6f61c6 --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -0,0 +1,5677 @@ +// 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, + LROperation, + 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'; +/** + * Client JSON configuration object, loaded from + * `src/v1/certificate_authority_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './certificate_authority_service_client_config.json'; +import {operationsProtos} from 'google-gax'; +const version = require('../../../package.json').version; + +/** + * [Certificate Authority + * Service][google.cloud.security.privateca.v1.CertificateAuthorityService] + * manages private certificate authorities and issued certificates. + * @class + * @memberof v1 + */ +export class CertificateAuthorityServiceClient { + 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}; + operationsClient: gax.OperationsClient; + certificateAuthorityServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of CertificateAuthorityServiceClient. + * + * @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 CertificateAuthorityServiceClient; + 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}`); + } + 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 = { + caPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/caPools/{ca_pool}' + ), + certificatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}' + ), + certificateAuthorityPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}' + ), + certificateRevocationListPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}' + ), + certificateTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/certificateTemplates/{certificate_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 = { + listCertificates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificates' + ), + listCertificateAuthorities: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificateAuthorities' + ), + listCaPools: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'caPools' + ), + listCertificateRevocationLists: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificateRevocationLists' + ), + listCertificateTemplates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'certificateTemplates' + ), + }; + + // This API contains "long-running operations", which return a + // an Operation object that allows for tracking of the operation, + // rather than holding a request open. + const protoFilesRoot = opts.fallback + ? this._gaxModule.protobuf.Root.fromJSON( + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('../../protos/protos.json') + ) + : this._gaxModule.protobuf.loadSync(nodejsProtoPath); + + this.operationsClient = this._gaxModule + .lro({ + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }) + .operationsClient(opts); + const activateCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const activateCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const createCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const disableCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const disableCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const enableCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const enableCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const undeleteCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const undeleteCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const deleteCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCertificateAuthorityResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateAuthority' + ) as gax.protobuf.Type; + const updateCertificateAuthorityMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createCaPoolResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CaPool' + ) as gax.protobuf.Type; + const createCaPoolMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCaPoolResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CaPool' + ) as gax.protobuf.Type; + const updateCaPoolMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteCaPoolResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CaPool' + ) as gax.protobuf.Type; + const deleteCaPoolMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCertificateRevocationListResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateRevocationList' + ) as gax.protobuf.Type; + const updateCertificateRevocationListMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const createCertificateTemplateResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateTemplate' + ) as gax.protobuf.Type; + const createCertificateTemplateMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const deleteCertificateTemplateResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty' + ) as gax.protobuf.Type; + const deleteCertificateTemplateMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + const updateCertificateTemplateResponse = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.CertificateTemplate' + ) as gax.protobuf.Type; + const updateCertificateTemplateMetadata = protoFilesRoot.lookup( + '.google.cloud.security.privateca.v1.OperationMetadata' + ) as gax.protobuf.Type; + + this.descriptors.longrunning = { + activateCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + activateCertificateAuthorityResponse.decode.bind( + activateCertificateAuthorityResponse + ), + activateCertificateAuthorityMetadata.decode.bind( + activateCertificateAuthorityMetadata + ) + ), + createCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createCertificateAuthorityResponse.decode.bind( + createCertificateAuthorityResponse + ), + createCertificateAuthorityMetadata.decode.bind( + createCertificateAuthorityMetadata + ) + ), + disableCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + disableCertificateAuthorityResponse.decode.bind( + disableCertificateAuthorityResponse + ), + disableCertificateAuthorityMetadata.decode.bind( + disableCertificateAuthorityMetadata + ) + ), + enableCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + enableCertificateAuthorityResponse.decode.bind( + enableCertificateAuthorityResponse + ), + enableCertificateAuthorityMetadata.decode.bind( + enableCertificateAuthorityMetadata + ) + ), + undeleteCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + undeleteCertificateAuthorityResponse.decode.bind( + undeleteCertificateAuthorityResponse + ), + undeleteCertificateAuthorityMetadata.decode.bind( + undeleteCertificateAuthorityMetadata + ) + ), + deleteCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteCertificateAuthorityResponse.decode.bind( + deleteCertificateAuthorityResponse + ), + deleteCertificateAuthorityMetadata.decode.bind( + deleteCertificateAuthorityMetadata + ) + ), + updateCertificateAuthority: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateAuthorityResponse.decode.bind( + updateCertificateAuthorityResponse + ), + updateCertificateAuthorityMetadata.decode.bind( + updateCertificateAuthorityMetadata + ) + ), + createCaPool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createCaPoolResponse.decode.bind(createCaPoolResponse), + createCaPoolMetadata.decode.bind(createCaPoolMetadata) + ), + updateCaPool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCaPoolResponse.decode.bind(updateCaPoolResponse), + updateCaPoolMetadata.decode.bind(updateCaPoolMetadata) + ), + deleteCaPool: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteCaPoolResponse.decode.bind(deleteCaPoolResponse), + deleteCaPoolMetadata.decode.bind(deleteCaPoolMetadata) + ), + updateCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateRevocationListResponse.decode.bind( + updateCertificateRevocationListResponse + ), + updateCertificateRevocationListMetadata.decode.bind( + updateCertificateRevocationListMetadata + ) + ), + createCertificateTemplate: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createCertificateTemplateResponse.decode.bind( + createCertificateTemplateResponse + ), + createCertificateTemplateMetadata.decode.bind( + createCertificateTemplateMetadata + ) + ), + deleteCertificateTemplate: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteCertificateTemplateResponse.decode.bind( + deleteCertificateTemplateResponse + ), + deleteCertificateTemplateMetadata.decode.bind( + deleteCertificateTemplateMetadata + ) + ), + updateCertificateTemplate: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateTemplateResponse.decode.bind( + updateCertificateTemplateResponse + ), + updateCertificateTemplateMetadata.decode.bind( + updateCertificateTemplateMetadata + ) + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.security.privateca.v1.CertificateAuthorityService', + 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.certificateAuthorityServiceStub) { + return this.certificateAuthorityServiceStub; + } + + // Put together the "service stub" for + // google.cloud.security.privateca.v1.CertificateAuthorityService. + this.certificateAuthorityServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.security.privateca.v1.CertificateAuthorityService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.security.privateca.v1 + .CertificateAuthorityService, + 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 certificateAuthorityServiceStubMethods = [ + 'createCertificate', + 'getCertificate', + 'listCertificates', + 'revokeCertificate', + 'updateCertificate', + 'activateCertificateAuthority', + 'createCertificateAuthority', + 'disableCertificateAuthority', + 'enableCertificateAuthority', + 'fetchCertificateAuthorityCsr', + 'getCertificateAuthority', + 'listCertificateAuthorities', + 'undeleteCertificateAuthority', + 'deleteCertificateAuthority', + 'updateCertificateAuthority', + 'createCaPool', + 'updateCaPool', + 'getCaPool', + 'listCaPools', + 'deleteCaPool', + 'fetchCaCerts', + 'getCertificateRevocationList', + 'listCertificateRevocationLists', + 'updateCertificateRevocationList', + 'createCertificateTemplate', + 'deleteCertificateTemplate', + 'getCertificateTemplate', + 'listCertificateTemplates', + 'updateCertificateTemplate', + ]; + for (const methodName of certificateAuthorityServiceStubMethods) { + const callPromise = this.certificateAuthorityServiceStub.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] || + this.descriptors.longrunning[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.certificateAuthorityServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'privateca.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 'privateca.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 -- + // ------------------- + createCertificate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | undefined + ), + {} | undefined + ] + >; + createCertificate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCertificate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new {@link google.cloud.security.privateca.v1.Certificate|Certificate} + * in a given Project, Location from a particular + * {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.Certificate|Certificate}, in the + * format `projects/* /locations/* /caPools/*`. + * @param {string} [request.certificateId] + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the Enterprise + * {@link google.cloud.security.privateca.v1.CaPool.Tier|CaPool.Tier}, but is + * optional and its value is ignored otherwise. + * @param {google.cloud.security.privateca.v1.Certificate} request.certificate + * Required. A {@link google.cloud.security.privateca.v1.Certificate|Certificate} + * with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.validateOnly] + * Optional. If this is true, no + * {@link google.cloud.security.privateca.v1.Certificate|Certificate} resource will + * be persisted regardless of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool}'s + * {@link google.cloud.security.privateca.v1.CaPool.tier|tier}, and the returned + * {@link google.cloud.security.privateca.v1.Certificate|Certificate} will not + * contain the + * {@link google.cloud.security.privateca.v1.Certificate.pem_certificate|pem_certificate} + * field. + * @param {string} [request.issuingCertificateAuthorityId] + * Optional. The resource ID of the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * that should issue the certificate. This optional field will ignore the + * load-balancing scheme of the Pool and directly issue the certificate from + * the CA with the specified ID, contained in the same + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} referenced by `parent`. + * Per-CA quota rules apply. If left empty, a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * will be chosen from the {@link google.cloud.security.privateca.v1.CaPool|CaPool} + * by the service. For example, to issue a + * {@link google.cloud.security.privateca.v1.Certificate|Certificate} from a + * Certificate Authority with resource name + * "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", + * you can set the + * {@link google.cloud.security.privateca.v1.CreateCertificateRequest.parent|parent} + * to "projects/my-project/locations/us-central1/caPools/my-pool" and the + * {@link google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id|issuing_certificate_authority_id} + * to "my-ca". + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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.createCertificate(request); + */ + createCertificate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | 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.createCertificate(request, options, callback); + } + getCertificate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateRequest + | undefined + ), + {} | undefined + ] + >; + getCertificate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.Certificate.name|name} + * of the {@link google.cloud.security.privateca.v1.Certificate|Certificate} to + * get. + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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.getCertificate(request); + */ + getCertificate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IGetCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateRequest + | 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.getCertificate(request, options, callback); + } + revokeCertificate( + request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest + | undefined + ), + {} | undefined + ] + >; + revokeCertificate( + request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + revokeCertificate( + request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Revoke a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.Certificate|Certificate} in the format + * `projects/* /locations/* /caPools/* /certificates/*`. + * @param {google.cloud.security.privateca.v1.RevocationReason} request.reason + * Required. The + * {@link google.cloud.security.privateca.v1.RevocationReason|RevocationReason} for + * revoking this certificate. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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.revokeCertificate(request); + */ + revokeCertificate( + request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest + | 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.revokeCertificate(request, options, callback); + } + updateCertificate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest + | undefined + ), + {} | undefined + ] + >; + updateCertificate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCertificate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Update a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. + * Currently, the only field you can update is the + * {@link google.cloud.security.privateca.v1.Certificate.labels|labels} field. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.Certificate} request.certificate + * Required. {@link google.cloud.security.privateca.v1.Certificate|Certificate} + * with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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.updateCertificate(request); + */ + updateCertificate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest + | 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({ + 'certificate.name': request.certificate!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificate(request, options, callback); + } + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, + ( + | protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest + | undefined + ), + {} | undefined + ] + >; + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Fetch a certificate signing request (CSR) from a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * that is in state + * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} + * and is of type + * {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. + * The CSR must then be signed by the desired parent Certificate Authority, + * which could be another + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * resource, or could be an on-prem certificate authority. See also + * {@link google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse}. + * 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.fetchCertificateAuthorityCsr(request); + */ + fetchCertificateAuthorityCsr( + request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, + | protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse, + ( + | protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest + | 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.fetchCertificateAuthorityCsr( + request, + options, + callback + ); + } + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest + | undefined + ), + {} | undefined + ] + >; + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The + * {@link google.cloud.security.privateca.v1.CertificateAuthority.name|name} of the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * to get. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1.CertificateAuthority}. + * 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.getCertificateAuthority(request); + */ + getCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + | protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest + | 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.getCertificateAuthority( + request, + options, + callback + ); + } + getCaPool( + request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | undefined, + {} | undefined + ] + >; + getCaPool( + request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICaPool, + | protos.google.cloud.security.privateca.v1.IGetCaPoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCaPool( + request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICaPool, + | protos.google.cloud.security.privateca.v1.IGetCaPoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.CaPool.name|name} of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} to get. + * @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 [CaPool]{@link google.cloud.security.privateca.v1.CaPool}. + * 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.getCaPool(request); + */ + getCaPool( + request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICaPool, + | protos.google.cloud.security.privateca.v1.IGetCaPoolRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICaPool, + | protos.google.cloud.security.privateca.v1.IGetCaPoolRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IGetCaPoolRequest | 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.getCaPool(request, options, callback); + } + fetchCaCerts( + request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, + ( + | protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest + | undefined + ), + {} | undefined + ] + >; + fetchCaCerts( + request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, + | protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + fetchCaCerts( + request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, + | protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * FetchCaCerts returns the current trust anchor for the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool}. This will include CA + * certificate chains for all ACTIVE + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * resources in the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.caPool + * Required. The resource name for the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the format + * `projects/* /locations/* /caPools/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [FetchCaCertsResponse]{@link google.cloud.security.privateca.v1.FetchCaCertsResponse}. + * 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.fetchCaCerts(request); + */ + fetchCaCerts( + request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, + | protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, + | protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse, + ( + | protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest + | 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({ + ca_pool: request.caPool || '', + }); + this.initialize(); + return this.innerApiCalls.fetchCaCerts(request, options, callback); + } + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest + | undefined + ), + {} | undefined + ] + >; + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The + * {@link google.cloud.security.privateca.v1.CertificateRevocationList.name|name} + * of the + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} + * to get. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1.CertificateRevocationList}. + * 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.getCertificateRevocationList(request); + */ + getCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + | protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest + | 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.getCertificateRevocationList( + request, + options, + callback + ); + } + getCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest + | undefined + ), + {} | undefined + ] + >; + getCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + | protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + | protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + /** + * Returns a + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The + * {@link google.cloud.security.privateca.v1.CertificateTemplate.name|name} of the + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} + * to get. + * @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 [CertificateTemplate]{@link google.cloud.security.privateca.v1.CertificateTemplate}. + * 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.getCertificateTemplate(request); + */ + getCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + | protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + | protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + ( + | protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest + | 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.getCertificateTemplate( + request, + options, + callback + ); + } + + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Activate a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * that is in state + * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} + * and is of type + * {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. + * After the parent Certificate Authority signs a certificate signing request + * from + * {@link google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr|FetchCertificateAuthorityCsr}, + * this method can complete the activation process. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} request.pemCaCertificate + * Required. The signed CA certificate issued from + * {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr|FetchCertificateAuthorityCsrResponse.pem_csr}. + * @param {google.cloud.security.privateca.v1.SubordinateConfig} request.subordinateConfig + * Required. Must include information about the issuer of + * 'pem_ca_certificate', and any further issuers until the self-signed CA. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.activateCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.activateCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `activateCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkActivateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkActivateCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.activateCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in a given Project and Location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, + * in the format `projects/* /locations/* /caPools/*`. + * @param {string} request.certificateAuthorityId + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param {google.cloud.security.privateca.v1.CertificateAuthority} request.certificateAuthority + * Required. A + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.createCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Disable a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.disableCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + disableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.disableCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `disableCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDisableCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDisableCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.disableCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Enable a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.enableCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + enableCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.enableCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `enableCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkEnableCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkEnableCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.enableCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + undeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + undeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Undelete a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * that has been deleted. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.undeleteCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + undeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.undeleteCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `undeleteCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUndeleteCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUndeleteCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.undeleteCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + deleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Delete a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.ignoreActiveCertificates] + * Optional. This field allows the CA to be deleted even if the CA has + * active certs. Active certs include both unrevoked and unexpired certs. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + deleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.deleteCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CertificateAuthority} request.certificateAuthority + * Required. + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateCertificateAuthority(request); + * const [response] = await operation.promise(); + */ + updateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'certificate_authority.name': request.certificateAuthority!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificateAuthority( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateCertificateAuthority()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCertificateAuthorityProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateAuthority, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + createCaPool( + request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCaPool( + request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCaPool( + request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool}, in the format + * `projects/* /locations/*`. + * @param {string} request.caPoolId + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param {google.cloud.security.privateca.v1.CaPool} request.caPool + * Required. A {@link google.cloud.security.privateca.v1.CaPool|CaPool} with + * initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createCaPool(request); + * const [response] = await operation.promise(); + */ + createCaPool( + request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.createCaPool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `createCaPool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateCaPoolProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateCaPoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CaPool, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createCaPool, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CaPool, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + updateCaPool( + request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCaPool( + request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCaPool( + request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CaPool} request.caPool + * Required. {@link google.cloud.security.privateca.v1.CaPool|CaPool} with updated + * values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateCaPool(request); + * const [response] = await operation.promise(); + */ + updateCaPool( + request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'ca_pool.name': request.caPool!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCaPool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `updateCaPool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCaPoolProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateCaPoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CaPool, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateCaPool, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CaPool, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + deleteCaPool( + request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteCaPool( + request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteCaPool( + request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Delete a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the format + * `projects/* /locations/* /caPools/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteCaPool(request); + * const [response] = await operation.promise(); + */ + deleteCaPool( + request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.deleteCaPool(request, options, callback); + } + /** + * Check the status of the long running operation returned by `deleteCaPool()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteCaPoolProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteCaPoolProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CaPool, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteCaPool, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CaPool, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CertificateRevocationList} request.certificateRevocationList + * Required. + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} + * with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateCertificateRevocationList(request); + * const [response] = await operation.promise(); + */ + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'certificate_revocation_list.name': + request.certificateRevocationList!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificateRevocationList( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateCertificateRevocationList()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateCertificateRevocationListProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateRevocationList, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateCertificateRevocationList, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateRevocationList, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + createCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Create a new + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} + * in a given Project and Location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}, + * in the format `projects/* /locations/*`. + * @param {string} request.certificateTemplateId + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + * @param {google.cloud.security.privateca.v1.CertificateTemplate} request.certificateTemplate + * Required. A + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} + * with initial field values. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.createCertificateTemplate(request); + * const [response] = await operation.promise(); + */ + createCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.createCertificateTemplate( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `createCertificateTemplate()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkCreateCertificateTemplateProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkCreateCertificateTemplateProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateTemplate, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.createCertificateTemplate, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateTemplate, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + deleteCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + deleteCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + deleteCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, + callback: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * DeleteCertificateTemplate deletes a + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} + * in the format `projects/* /locations/* /certificateTemplates/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.deleteCertificateTemplate(request); + * const [response] = await operation.promise(); + */ + deleteCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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.deleteCertificateTemplate( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `deleteCertificateTemplate()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkDeleteCertificateTemplateProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkDeleteCertificateTemplateProgress( + name: string + ): Promise< + LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.deleteCertificateTemplate, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.protobuf.Empty, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + updateCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + /** + * Update a + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CertificateTemplate} request.certificateTemplate + * Required. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} + * with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that + * if you must retry your request, the server will know to ignore the request + * if it has already been completed. The server will guarantee that for at + * least 60 minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const [operation] = await client.updateCertificateTemplate(request); + * const [response] = await operation.promise(); + */ + updateCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | 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({ + 'certificate_template.name': request.certificateTemplate!.name || '', + }); + this.initialize(); + return this.innerApiCalls.updateCertificateTemplate( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `updateCertificateTemplate()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example + * const decodedOperation = await checkUpdateCertificateTemplateProgress(name); + * console.log(decodedOperation.result); + * console.log(decodedOperation.done); + * console.log(decodedOperation.metadata); + */ + async checkUpdateCertificateTemplateProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1.CertificateTemplate, + protos.google.cloud.security.privateca.v1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.updateCertificateTemplate, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1.CertificateTemplate, + protos.google.cloud.security.privateca.v1.OperationMetadata + >; + } + listCertificates( + request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate[], + protos.google.cloud.security.privateca.v1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificatesResponse + ] + >; + listCertificates( + request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificate + > + ): void; + listCertificates( + request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificate + > + ): void; + /** + * Lists {@link google.cloud.security.privateca.v1.Certificate|Certificates}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the + * format `projects/* /locations/* /caPools/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include + * in the response. Further + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} can + * subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. For + * details on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. For details on + * supported fields and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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 `listCertificatesAsync()` + * 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. + */ + listCertificates( + request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificate + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificate + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate[], + protos.google.cloud.security.privateca.v1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificatesResponse + ] + > | 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.listCertificates(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the + * format `projects/* /locations/* /caPools/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include + * in the response. Further + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} can + * subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. For + * details on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. For details on + * supported fields and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate} 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 `listCertificatesAsync()` + * 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. + */ + listCertificatesStream( + request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + 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.listCertificates.createStream( + this.innerApiCalls.listCertificates as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCertificates`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the + * format `projects/* /locations/* /caPools/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include + * in the response. Further + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} can + * subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. For + * details on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. For details on + * supported fields and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + * @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 + * [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. 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.listCertificatesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listCertificatesAsync( + request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + 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.listCertificates.asyncIterate( + this.innerApiCalls['listCertificates'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateAuthority[], + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + ] + >; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateAuthority + > + ): void; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateAuthority + > + ): void; + /** + * Lists + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, + * in the format `projects/* /locations/* /caPools/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1.CertificateAuthority}. + * 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 `listCertificateAuthoritiesAsync()` + * 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. + */ + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateAuthority + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateAuthority + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateAuthority[], + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + ] + > | 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.listCertificateAuthorities( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, + * in the format `projects/* /locations/* /caPools/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1.CertificateAuthority} 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 `listCertificateAuthoritiesAsync()` + * 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. + */ + listCertificateAuthoritiesStream( + request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + 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.listCertificateAuthorities.createStream( + this.innerApiCalls.listCertificateAuthorities as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCertificateAuthorities`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the + * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, + * in the format `projects/* /locations/* /caPools/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 + * [CertificateAuthority]{@link google.cloud.security.privateca.v1.CertificateAuthority}. 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.listCertificateAuthoritiesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listCertificateAuthoritiesAsync( + request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + 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.listCertificateAuthorities.asyncIterate( + this.innerApiCalls['listCertificateAuthorities'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listCaPools( + request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICaPool[], + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest | null, + protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + ] + >; + listCaPools( + request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICaPool + > + ): void; + listCaPools( + request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICaPool + > + ): void; + /** + * Lists {@link google.cloud.security.privateca.v1.CaPool|CaPools}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CaPool|CaPools}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CaPool|CaPools} to include in the + * response. Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can + * subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CaPool]{@link google.cloud.security.privateca.v1.CaPool}. + * 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 `listCaPoolsAsync()` + * 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. + */ + listCaPools( + request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICaPool + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICaPool + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICaPool[], + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest | null, + protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + ] + > | 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.listCaPools(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CaPool|CaPools}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CaPool|CaPools} to include in the + * response. Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can + * subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CaPool]{@link google.cloud.security.privateca.v1.CaPool} 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 `listCaPoolsAsync()` + * 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. + */ + listCaPoolsStream( + request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + 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.listCaPools.createStream( + this.innerApiCalls.listCaPools as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCaPools`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CaPool|CaPools}, in the format + * `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CaPool|CaPools} to include in the + * response. Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can + * subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 + * [CaPool]{@link google.cloud.security.privateca.v1.CaPool}. 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.listCaPoolsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listCaPoolsAsync( + request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + 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.listCaPools.asyncIterate( + this.innerApiCalls['listCaPools'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateRevocationList[], + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + ] + >; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateRevocationList + > + ): void; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateRevocationList + > + ): void; + /** + * Lists + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1.CertificateRevocationList}. + * 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 `listCertificateRevocationListsAsync()` + * 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. + */ + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateRevocationList + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateRevocationList + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateRevocationList[], + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + ] + > | 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.listCertificateRevocationLists( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1.CertificateRevocationList} 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 `listCertificateRevocationListsAsync()` + * 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. + */ + listCertificateRevocationListsStream( + request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + 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.listCertificateRevocationLists.createStream( + this.innerApiCalls.listCertificateRevocationLists as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCertificateRevocationLists`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, + * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 + * [CertificateRevocationList]{@link google.cloud.security.privateca.v1.CertificateRevocationList}. 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.listCertificateRevocationListsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listCertificateRevocationListsAsync( + request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + 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.listCertificateRevocationLists.asyncIterate( + this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + listCertificateTemplates( + request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateTemplate[], + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + ] + >; + listCertificateTemplates( + request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateTemplate + > + ): void; + listCertificateTemplates( + request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateTemplate + > + ): void; + /** + * Lists + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, + * in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateTemplate]{@link google.cloud.security.privateca.v1.CertificateTemplate}. + * 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 `listCertificateTemplatesAsync()` + * 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. + */ + listCertificateTemplates( + request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateTemplate + >, + callback?: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateTemplate + > + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateTemplate[], + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + ] + > | 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.listCertificateTemplates( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, + * in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 [CertificateTemplate]{@link google.cloud.security.privateca.v1.CertificateTemplate} 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 `listCertificateTemplatesAsync()` + * 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. + */ + listCertificateTemplatesStream( + request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + 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.listCertificateTemplates.createStream( + this.innerApiCalls.listCertificateTemplates as gax.GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCertificateTemplates`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the location associated with the + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, + * in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. Limit on the number of + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} + * to include in the response. Further + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} + * can subsequently be obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} + * in a subsequent request. If unspecified, the server will pick an + * appropriate default. + * @param {string} [request.pageToken] + * Optional. Pagination token, returned earlier via + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token}. + * @param {string} [request.filter] + * Optional. Only include resources that match the filter in the response. + * @param {string} [request.orderBy] + * Optional. Specify how the results should be sorted. + * @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 + * [CertificateTemplate]{@link google.cloud.security.privateca.v1.CertificateTemplate}. 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.listCertificateTemplatesAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listCertificateTemplatesAsync( + request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + 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.listCertificateTemplates.asyncIterate( + this.innerApiCalls['listCertificateTemplates'] as GaxCall, + (request as unknown) as RequestType, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified caPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} ca_pool + * @returns {string} Resource name string. + */ + caPoolPath(project: string, location: string, caPool: string) { + return this.pathTemplates.caPoolPathTemplate.render({ + project: project, + location: location, + ca_pool: caPool, + }); + } + + /** + * Parse the project from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).project; + } + + /** + * Parse the location from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).location; + } + + /** + * Parse the ca_pool from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the ca_pool. + */ + matchCaPoolFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).ca_pool; + } + + /** + * Return a fully-qualified certificate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} ca_pool + * @param {string} certificate + * @returns {string} Resource name string. + */ + certificatePath( + project: string, + location: string, + caPool: string, + certificate: string + ) { + return this.pathTemplates.certificatePathTemplate.render({ + project: project, + location: location, + ca_pool: caPool, + certificate: certificate, + }); + } + + /** + * Parse the project from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .project; + } + + /** + * Parse the location from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .location; + } + + /** + * Parse the ca_pool from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the ca_pool. + */ + matchCaPoolFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .ca_pool; + } + + /** + * Parse the certificate from Certificate resource. + * + * @param {string} certificateName + * A fully-qualified path representing Certificate resource. + * @returns {string} A string representing the certificate. + */ + matchCertificateFromCertificateName(certificateName: string) { + return this.pathTemplates.certificatePathTemplate.match(certificateName) + .certificate; + } + + /** + * Return a fully-qualified certificateAuthority resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} ca_pool + * @param {string} certificate_authority + * @returns {string} Resource name string. + */ + certificateAuthorityPath( + project: string, + location: string, + caPool: string, + certificateAuthority: string + ) { + return this.pathTemplates.certificateAuthorityPathTemplate.render({ + project: project, + location: location, + ca_pool: caPool, + certificate_authority: certificateAuthority, + }); + } + + /** + * Parse the project from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateAuthorityName(certificateAuthorityName: string) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).project; + } + + /** + * Parse the location from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateAuthorityName(certificateAuthorityName: string) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).location; + } + + /** + * Parse the ca_pool from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the ca_pool. + */ + matchCaPoolFromCertificateAuthorityName(certificateAuthorityName: string) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).ca_pool; + } + + /** + * Parse the certificate_authority from CertificateAuthority resource. + * + * @param {string} certificateAuthorityName + * A fully-qualified path representing CertificateAuthority resource. + * @returns {string} A string representing the certificate_authority. + */ + matchCertificateAuthorityFromCertificateAuthorityName( + certificateAuthorityName: string + ) { + return this.pathTemplates.certificateAuthorityPathTemplate.match( + certificateAuthorityName + ).certificate_authority; + } + + /** + * Return a fully-qualified certificateRevocationList resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} ca_pool + * @param {string} certificate_authority + * @param {string} certificate_revocation_list + * @returns {string} Resource name string. + */ + certificateRevocationListPath( + project: string, + location: string, + caPool: string, + certificateAuthority: string, + certificateRevocationList: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.render({ + project: project, + location: location, + ca_pool: caPool, + certificate_authority: certificateAuthority, + certificate_revocation_list: certificateRevocationList, + }); + } + + /** + * Parse the project from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).project; + } + + /** + * Parse the location from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).location; + } + + /** + * Parse the ca_pool from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the ca_pool. + */ + matchCaPoolFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).ca_pool; + } + + /** + * Parse the certificate_authority from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the certificate_authority. + */ + matchCertificateAuthorityFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).certificate_authority; + } + + /** + * Parse the certificate_revocation_list from CertificateRevocationList resource. + * + * @param {string} certificateRevocationListName + * A fully-qualified path representing CertificateRevocationList resource. + * @returns {string} A string representing the certificate_revocation_list. + */ + matchCertificateRevocationListFromCertificateRevocationListName( + certificateRevocationListName: string + ) { + return this.pathTemplates.certificateRevocationListPathTemplate.match( + certificateRevocationListName + ).certificate_revocation_list; + } + + /** + * Return a fully-qualified certificateTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} certificate_template + * @returns {string} Resource name string. + */ + certificateTemplatePath( + project: string, + location: string, + certificateTemplate: string + ) { + return this.pathTemplates.certificateTemplatePathTemplate.render({ + project: project, + location: location, + certificate_template: certificateTemplate, + }); + } + + /** + * Parse the project from CertificateTemplate resource. + * + * @param {string} certificateTemplateName + * A fully-qualified path representing CertificateTemplate resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCertificateTemplateName(certificateTemplateName: string) { + return this.pathTemplates.certificateTemplatePathTemplate.match( + certificateTemplateName + ).project; + } + + /** + * Parse the location from CertificateTemplate resource. + * + * @param {string} certificateTemplateName + * A fully-qualified path representing CertificateTemplate resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCertificateTemplateName(certificateTemplateName: string) { + return this.pathTemplates.certificateTemplatePathTemplate.match( + certificateTemplateName + ).location; + } + + /** + * Parse the certificate_template from CertificateTemplate resource. + * + * @param {string} certificateTemplateName + * A fully-qualified path representing CertificateTemplate resource. + * @returns {string} A string representing the certificate_template. + */ + matchCertificateTemplateFromCertificateTemplateName( + certificateTemplateName: string + ) { + return this.pathTemplates.certificateTemplatePathTemplate.match( + certificateTemplateName + ).certificate_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.certificateAuthorityServiceStub!.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client_config.json b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client_config.json new file mode 100644 index 00000000000..d7847b0603f --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client_config.json @@ -0,0 +1,176 @@ +{ + "interfaces": { + "google.cloud.security.privateca.v1.CertificateAuthorityService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_deadline_exceeded_unavailable": [ + "UNKNOWN", + "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": { + "CreateCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificates": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "RevokeCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ActivateCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "CreateCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "DisableCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "EnableCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "FetchCertificateAuthorityCsr": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificateAuthorities": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UndeleteCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "DeleteCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificateAuthority": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "CreateCaPool": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCaPool": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCaPool": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCaPools": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "DeleteCaPool": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "FetchCaCerts": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificateRevocationList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificateRevocationLists": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificateRevocationList": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "CreateCertificateTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "DeleteCertificateTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "GetCertificateTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "ListCertificateTemplates": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + }, + "UpdateCertificateTemplate": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_deadline_exceeded_unavailable", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_proto_list.json b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_proto_list.json new file mode 100644 index 00000000000..ec340e404e8 --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/cloud/security/privateca/v1/resources.proto", + "../../protos/google/cloud/security/privateca/v1/service.proto" +] diff --git a/packages/google-cloud-security-privateca/src/v1/gapic_metadata.json b/packages/google-cloud-security-privateca/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..3bdcc22fd7e --- /dev/null +++ b/packages/google-cloud-security-privateca/src/v1/gapic_metadata.json @@ -0,0 +1,333 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.security.privateca.v1", + "libraryPackage": "@google-cloud/privateca", + "services": { + "CertificateAuthorityService": { + "clients": { + "grpc": { + "libraryClient": "CertificateAuthorityServiceClient", + "rpcs": { + "CreateCertificate": { + "methods": [ + "createCertificate" + ] + }, + "GetCertificate": { + "methods": [ + "getCertificate" + ] + }, + "RevokeCertificate": { + "methods": [ + "revokeCertificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "updateCertificate" + ] + }, + "FetchCertificateAuthorityCsr": { + "methods": [ + "fetchCertificateAuthorityCsr" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "getCertificateAuthority" + ] + }, + "GetCaPool": { + "methods": [ + "getCaPool" + ] + }, + "FetchCaCerts": { + "methods": [ + "fetchCaCerts" + ] + }, + "GetCertificateRevocationList": { + "methods": [ + "getCertificateRevocationList" + ] + }, + "GetCertificateTemplate": { + "methods": [ + "getCertificateTemplate" + ] + }, + "ActivateCertificateAuthority": { + "methods": [ + "activateCertificateAuthority" + ] + }, + "CreateCertificateAuthority": { + "methods": [ + "createCertificateAuthority" + ] + }, + "DisableCertificateAuthority": { + "methods": [ + "disableCertificateAuthority" + ] + }, + "EnableCertificateAuthority": { + "methods": [ + "enableCertificateAuthority" + ] + }, + "UndeleteCertificateAuthority": { + "methods": [ + "undeleteCertificateAuthority" + ] + }, + "DeleteCertificateAuthority": { + "methods": [ + "deleteCertificateAuthority" + ] + }, + "UpdateCertificateAuthority": { + "methods": [ + "updateCertificateAuthority" + ] + }, + "CreateCaPool": { + "methods": [ + "createCaPool" + ] + }, + "UpdateCaPool": { + "methods": [ + "updateCaPool" + ] + }, + "DeleteCaPool": { + "methods": [ + "deleteCaPool" + ] + }, + "UpdateCertificateRevocationList": { + "methods": [ + "updateCertificateRevocationList" + ] + }, + "CreateCertificateTemplate": { + "methods": [ + "createCertificateTemplate" + ] + }, + "DeleteCertificateTemplate": { + "methods": [ + "deleteCertificateTemplate" + ] + }, + "UpdateCertificateTemplate": { + "methods": [ + "updateCertificateTemplate" + ] + }, + "ListCertificates": { + "methods": [ + "listCertificates", + "listCertificatesStream", + "listCertificatesAsync" + ] + }, + "ListCertificateAuthorities": { + "methods": [ + "listCertificateAuthorities", + "listCertificateAuthoritiesStream", + "listCertificateAuthoritiesAsync" + ] + }, + "ListCaPools": { + "methods": [ + "listCaPools", + "listCaPoolsStream", + "listCaPoolsAsync" + ] + }, + "ListCertificateRevocationLists": { + "methods": [ + "listCertificateRevocationLists", + "listCertificateRevocationListsStream", + "listCertificateRevocationListsAsync" + ] + }, + "ListCertificateTemplates": { + "methods": [ + "listCertificateTemplates", + "listCertificateTemplatesStream", + "listCertificateTemplatesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "CertificateAuthorityServiceClient", + "rpcs": { + "CreateCertificate": { + "methods": [ + "createCertificate" + ] + }, + "GetCertificate": { + "methods": [ + "getCertificate" + ] + }, + "RevokeCertificate": { + "methods": [ + "revokeCertificate" + ] + }, + "UpdateCertificate": { + "methods": [ + "updateCertificate" + ] + }, + "FetchCertificateAuthorityCsr": { + "methods": [ + "fetchCertificateAuthorityCsr" + ] + }, + "GetCertificateAuthority": { + "methods": [ + "getCertificateAuthority" + ] + }, + "GetCaPool": { + "methods": [ + "getCaPool" + ] + }, + "FetchCaCerts": { + "methods": [ + "fetchCaCerts" + ] + }, + "GetCertificateRevocationList": { + "methods": [ + "getCertificateRevocationList" + ] + }, + "GetCertificateTemplate": { + "methods": [ + "getCertificateTemplate" + ] + }, + "ActivateCertificateAuthority": { + "methods": [ + "activateCertificateAuthority" + ] + }, + "CreateCertificateAuthority": { + "methods": [ + "createCertificateAuthority" + ] + }, + "DisableCertificateAuthority": { + "methods": [ + "disableCertificateAuthority" + ] + }, + "EnableCertificateAuthority": { + "methods": [ + "enableCertificateAuthority" + ] + }, + "UndeleteCertificateAuthority": { + "methods": [ + "undeleteCertificateAuthority" + ] + }, + "DeleteCertificateAuthority": { + "methods": [ + "deleteCertificateAuthority" + ] + }, + "UpdateCertificateAuthority": { + "methods": [ + "updateCertificateAuthority" + ] + }, + "CreateCaPool": { + "methods": [ + "createCaPool" + ] + }, + "UpdateCaPool": { + "methods": [ + "updateCaPool" + ] + }, + "DeleteCaPool": { + "methods": [ + "deleteCaPool" + ] + }, + "UpdateCertificateRevocationList": { + "methods": [ + "updateCertificateRevocationList" + ] + }, + "CreateCertificateTemplate": { + "methods": [ + "createCertificateTemplate" + ] + }, + "DeleteCertificateTemplate": { + "methods": [ + "deleteCertificateTemplate" + ] + }, + "UpdateCertificateTemplate": { + "methods": [ + "updateCertificateTemplate" + ] + }, + "ListCertificates": { + "methods": [ + "listCertificates", + "listCertificatesStream", + "listCertificatesAsync" + ] + }, + "ListCertificateAuthorities": { + "methods": [ + "listCertificateAuthorities", + "listCertificateAuthoritiesStream", + "listCertificateAuthoritiesAsync" + ] + }, + "ListCaPools": { + "methods": [ + "listCaPools", + "listCaPoolsStream", + "listCaPoolsAsync" + ] + }, + "ListCertificateRevocationLists": { + "methods": [ + "listCertificateRevocationLists", + "listCertificateRevocationListsStream", + "listCertificateRevocationListsAsync" + ] + }, + "ListCertificateTemplates": { + "methods": [ + "listCertificateTemplates", + "listCertificateTemplatesStream", + "listCertificateTemplatesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-cloud-security-privateca/src/v1/index.ts b/packages/google-cloud-security-privateca/src/v1/index.ts new file mode 100644 index 00000000000..707c36defcc --- /dev/null +++ b/packages/google-cloud-security-privateca/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 {CertificateAuthorityServiceClient} from './certificate_authority_service_client'; diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts new file mode 100644 index 00000000000..3a16720cec6 --- /dev/null +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -0,0 +1,6541 @@ +// 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 certificateauthorityserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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 stubLongRunningCall( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().rejects(callError) + : sinon.stub().resolves([mockOperation]); +} + +function stubLongRunningCallWithCallback( + response?: ResponseType, + callError?: Error, + lroError?: Error +) { + const innerStub = lroError + ? sinon.stub().rejects(lroError) + : sinon.stub().resolves([response]); + const mockOperation = { + promise: innerStub, + }; + return callError + ? sinon.stub().callsArgWith(2, callError) + : sinon.stub().callsArgWith(2, null, mockOperation); +} + +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.CertificateAuthorityServiceClient', () => { + it('has servicePath', () => { + const servicePath = + certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient + .port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + await client.initialize(); + assert(client.certificateAuthorityServiceStub); + }); + + it('has close method', () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.close(); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + 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 certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + 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('createCertificate', () => { + it('invokes createCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.createCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.createCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.createCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createCertificate(request), expectedError); + assert( + (client.innerApiCalls.createCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificate', () => { + it('invokes getCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.getCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.getCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.getCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCertificate(request), expectedError); + assert( + (client.innerApiCalls.getCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('revokeCertificate', () => { + it('invokes revokeCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.revokeCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.revokeCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.revokeCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes revokeCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.revokeCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.revokeCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.revokeCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes revokeCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.revokeCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.revokeCertificate(request), expectedError); + assert( + (client.innerApiCalls.revokeCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('updateCertificate', () => { + it('invokes updateCertificate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.updateCertificate = stubSimpleCall(expectedResponse); + const [response] = await client.updateCertificate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ); + client.innerApiCalls.updateCertificate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificate with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCertificate(request), expectedError); + assert( + (client.innerApiCalls.updateCertificate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('fetchCertificateAuthorityCsr', () => { + it('invokes fetchCertificateAuthorityCsr without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse() + ); + client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( + expectedResponse + ); + const [response] = await client.fetchCertificateAuthorityCsr(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchCertificateAuthorityCsr without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse() + ); + client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.fetchCertificateAuthorityCsr( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchCertificateAuthorityCsr with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.fetchCertificateAuthorityCsr(request), + expectedError + ); + assert( + (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificateAuthority', () => { + it('invokes getCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ); + client.innerApiCalls.getCertificateAuthority = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getCertificateAuthority(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ); + client.innerApiCalls.getCertificateAuthority = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificateAuthority( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificateAuthority | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificateAuthority with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificateAuthority = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.getCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCaPool', () => { + it('invokes getCaPool without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ); + client.innerApiCalls.getCaPool = stubSimpleCall(expectedResponse); + const [response] = await client.getCaPool(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCaPool without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ); + client.innerApiCalls.getCaPool = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCaPool( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICaPool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCaPool with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCaPool = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getCaPool(request), expectedError); + assert( + (client.innerApiCalls.getCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('fetchCaCerts', () => { + it('invokes fetchCaCerts without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() + ); + request.caPool = ''; + const expectedHeaderRequestParams = 'ca_pool='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCaCertsResponse() + ); + client.innerApiCalls.fetchCaCerts = stubSimpleCall(expectedResponse); + const [response] = await client.fetchCaCerts(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchCaCerts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes fetchCaCerts without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() + ); + request.caPool = ''; + const expectedHeaderRequestParams = 'ca_pool='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCaCertsResponse() + ); + client.innerApiCalls.fetchCaCerts = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.fetchCaCerts( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.IFetchCaCertsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.fetchCaCerts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes fetchCaCerts with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() + ); + request.caPool = ''; + const expectedHeaderRequestParams = 'ca_pool='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchCaCerts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.fetchCaCerts(request), expectedError); + assert( + (client.innerApiCalls.fetchCaCerts as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificateRevocationList', () => { + it('invokes getCertificateRevocationList without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ); + client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getCertificateRevocationList(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificateRevocationList without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ); + client.innerApiCalls.getCertificateRevocationList = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificateRevocationList( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificateRevocationList | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificateRevocationList with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getCertificateRevocationList(request), + expectedError + ); + assert( + (client.innerApiCalls.getCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('getCertificateTemplate', () => { + it('invokes getCertificateTemplate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ); + client.innerApiCalls.getCertificateTemplate = stubSimpleCall( + expectedResponse + ); + const [response] = await client.getCertificateTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes getCertificateTemplate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ); + client.innerApiCalls.getCertificateTemplate = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.getCertificateTemplate( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICertificateTemplate | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.getCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes getCertificateTemplate with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.getCertificateTemplate = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getCertificateTemplate(request), + expectedError + ); + assert( + (client.innerApiCalls.getCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + + describe('activateCertificateAuthority', () => { + it('invokes activateCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.activateCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes activateCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.activateCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes activateCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.activateCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes activateCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.activateCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.activateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkActivateCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkActivateCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkActivateCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkActivateCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createCertificateAuthority', () => { + it('invokes createCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('disableCertificateAuthority', () => { + it('invokes disableCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.disableCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes disableCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.disableCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes disableCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.disableCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes disableCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.disableCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.disableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDisableCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDisableCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDisableCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDisableCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('enableCertificateAuthority', () => { + it('invokes enableCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.enableCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes enableCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.enableCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes enableCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.enableCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes enableCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.enableCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.enableCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkEnableCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkEnableCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkEnableCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkEnableCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('undeleteCertificateAuthority', () => { + it('invokes undeleteCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.undeleteCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes undeleteCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.undeleteCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes undeleteCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.undeleteCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes undeleteCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.undeleteCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUndeleteCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUndeleteCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUndeleteCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUndeleteCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteCertificateAuthority', () => { + it('invokes deleteCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.deleteCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCertificateAuthority', () => { + it('invokes updateCertificateAuthority without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateCertificateAuthority(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateAuthority without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificateAuthority( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificateAuthority with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCertificateAuthority(request), + expectedError + ); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateAuthority with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() + ); + request.certificateAuthority = {}; + request.certificateAuthority.name = ''; + const expectedHeaderRequestParams = 'certificate_authority.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCertificateAuthority(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateCertificateAuthority as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateCertificateAuthorityProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateCertificateAuthorityProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCertificateAuthorityProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateCertificateAuthorityProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createCaPool', () => { + it('invokes createCaPool without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCaPool = stubLongRunningCall(expectedResponse); + const [operation] = await client.createCaPool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCaPool without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCaPool = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCaPool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCaPool with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCaPool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.createCaPool(request), expectedError); + assert( + (client.innerApiCalls.createCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCaPool with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCaPool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createCaPool(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateCaPoolProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateCaPoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateCaPoolProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCreateCaPoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCaPool', () => { + it('invokes updateCaPool without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() + ); + request.caPool = {}; + request.caPool.name = ''; + const expectedHeaderRequestParams = 'ca_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCaPool = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateCaPool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCaPool without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() + ); + request.caPool = {}; + request.caPool.name = ''; + const expectedHeaderRequestParams = 'ca_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCaPool = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCaPool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCaPool with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() + ); + request.caPool = {}; + request.caPool.name = ''; + const expectedHeaderRequestParams = 'ca_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCaPool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCaPool(request), expectedError); + assert( + (client.innerApiCalls.updateCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCaPool with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() + ); + request.caPool = {}; + request.caPool.name = ''; + const expectedHeaderRequestParams = 'ca_pool.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCaPool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCaPool(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateCaPoolProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateCaPoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCaPoolProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkUpdateCaPoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteCaPool', () => { + it('invokes deleteCaPool without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteCaPool = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteCaPool(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteCaPool without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteCaPool = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteCaPool( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteCaPool with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCaPool = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteCaPool(request), expectedError); + assert( + (client.innerApiCalls.deleteCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteCaPool with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCaPool = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteCaPool(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteCaPool as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteCaPoolProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteCaPoolProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteCaPoolProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkDeleteCaPoolProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCertificateRevocationList', () => { + it('invokes updateCertificateRevocationList without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateCertificateRevocationList(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateRevocationList without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificateRevocationList( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificateRevocationList with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCertificateRevocationList(request), + expectedError + ); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateRevocationList with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() + ); + request.certificateRevocationList = {}; + request.certificateRevocationList.name = ''; + const expectedHeaderRequestParams = 'certificate_revocation_list.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCertificateRevocationList(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateCertificateRevocationList as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateCertificateRevocationListProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateCertificateRevocationListProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCertificateRevocationListProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateCertificateRevocationListProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('createCertificateTemplate', () => { + it('invokes createCertificateTemplate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateTemplate = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.createCertificateTemplate(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateTemplate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createCertificateTemplate = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.createCertificateTemplate( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.createCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes createCertificateTemplate with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateTemplate = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCertificateTemplate(request), + expectedError + ); + assert( + (client.innerApiCalls.createCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes createCertificateTemplate with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.createCertificateTemplate = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.createCertificateTemplate(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.createCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkCreateCertificateTemplateProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateCertificateTemplateProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateCertificateTemplateProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkCreateCertificateTemplateProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('deleteCertificateTemplate', () => { + it('invokes deleteCertificateTemplate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.deleteCertificateTemplate(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteCertificateTemplate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.deleteCertificateTemplate( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.protobuf.IEmpty, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.deleteCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes deleteCertificateTemplate with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteCertificateTemplate(request), + expectedError + ); + assert( + (client.innerApiCalls.deleteCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes deleteCertificateTemplate with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.deleteCertificateTemplate(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.deleteCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkDeleteCertificateTemplateProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteCertificateTemplateProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteCertificateTemplateProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkDeleteCertificateTemplateProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('updateCertificateTemplate', () => { + it('invokes updateCertificateTemplate without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() + ); + request.certificateTemplate = {}; + request.certificateTemplate.name = ''; + const expectedHeaderRequestParams = 'certificate_template.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateTemplate = stubLongRunningCall( + expectedResponse + ); + const [operation] = await client.updateCertificateTemplate(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateTemplate without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() + ); + request.certificateTemplate = {}; + request.certificateTemplate.name = ''; + const expectedHeaderRequestParams = 'certificate_template.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateCertificateTemplate = stubLongRunningCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.updateCertificateTemplate( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.updateCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes updateCertificateTemplate with call error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() + ); + request.certificateTemplate = {}; + request.certificateTemplate.name = ''; + const expectedHeaderRequestParams = 'certificate_template.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateTemplate = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCertificateTemplate(request), + expectedError + ); + assert( + (client.innerApiCalls.updateCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes updateCertificateTemplate with LRO error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() + ); + request.certificateTemplate = {}; + request.certificateTemplate.name = ''; + const expectedHeaderRequestParams = 'certificate_template.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCertificateTemplate = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.updateCertificateTemplate(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.updateCertificateTemplate as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkUpdateCertificateTemplateProgress without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateCertificateTemplateProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateCertificateTemplateProgress with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkUpdateCertificateTemplateProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listCertificates', () => { + it('invokes listCertificates without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + ]; + client.innerApiCalls.listCertificates = stubSimpleCall(expectedResponse); + const [response] = await client.listCertificates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificates without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + ]; + client.innerApiCalls.listCertificates = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificates( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1.ICertificate[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificates with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCertificates(request), expectedError); + assert( + (client.innerApiCalls.listCertificates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificatesStream without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + ]; + client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.Certificate[] = []; + stream.on( + 'data', + (response: protos.google.cloud.security.privateca.v1.Certificate) => { + 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.listCertificates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificates, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificatesStream with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.Certificate[] = []; + stream.on( + 'data', + (response: protos.google.cloud.security.privateca.v1.Certificate) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificates, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificates without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.Certificate() + ), + ]; + client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1.ICertificate[] = []; + const iterable = client.listCertificatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificates with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1.ICertificate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCertificateAuthorities', () => { + it('invokes listCertificateAuthorities without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + ]; + client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listCertificateAuthorities(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateAuthorities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateAuthorities without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + ]; + client.innerApiCalls.listCertificateAuthorities = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificateAuthorities( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1.ICertificateAuthority[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateAuthorities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificateAuthorities with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCertificateAuthorities(request), + expectedError + ); + assert( + (client.innerApiCalls.listCertificateAuthorities as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateAuthoritiesStream without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + ]; + client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificateAuthoritiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CertificateAuthority[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1.CertificateAuthority + ) => { + 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.listCertificateAuthorities + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificateAuthorities, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificateAuthoritiesStream with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificateAuthoritiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CertificateAuthority[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1.CertificateAuthority + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificateAuthorities, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateAuthorities without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateAuthority() + ), + ]; + client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1.ICertificateAuthority[] = []; + const iterable = client.listCertificateAuthoritiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateAuthorities with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificateAuthoritiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1.ICertificateAuthority[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCaPools', () => { + it('invokes listCaPools without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + ]; + client.innerApiCalls.listCaPools = stubSimpleCall(expectedResponse); + const [response] = await client.listCaPools(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCaPools as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCaPools without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + ]; + client.innerApiCalls.listCaPools = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCaPools( + request, + ( + err?: Error | null, + result?: protos.google.cloud.security.privateca.v1.ICaPool[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCaPools as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCaPools with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCaPools = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCaPools(request), expectedError); + assert( + (client.innerApiCalls.listCaPools as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCaPoolsStream without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + ]; + client.descriptors.page.listCaPools.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCaPoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CaPool[] = []; + stream.on( + 'data', + (response: protos.google.cloud.security.privateca.v1.CaPool) => { + 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.listCaPools.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCaPools, request) + ); + assert.strictEqual( + (client.descriptors.page.listCaPools.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('invokes listCaPoolsStream with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCaPools.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCaPoolsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CaPool[] = []; + stream.on( + 'data', + (response: protos.google.cloud.security.privateca.v1.CaPool) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCaPools.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCaPools, request) + ); + assert.strictEqual( + (client.descriptors.page.listCaPools.createStream as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCaPools without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CaPool() + ), + ]; + client.descriptors.page.listCaPools.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1.ICaPool[] = []; + const iterable = client.listCaPoolsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCaPools.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCaPools.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCaPools with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCaPools.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCaPoolsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1.ICaPool[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCaPools.asyncIterate as SinonStub).getCall( + 0 + ).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCaPools.asyncIterate as SinonStub).getCall( + 0 + ).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCertificateRevocationLists', () => { + it('invokes listCertificateRevocationLists without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + ]; + client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listCertificateRevocationLists(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateRevocationLists as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateRevocationLists without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + ]; + client.innerApiCalls.listCertificateRevocationLists = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificateRevocationLists( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateRevocationLists as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificateRevocationLists with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCertificateRevocationLists(request), + expectedError + ); + assert( + (client.innerApiCalls.listCertificateRevocationLists as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateRevocationListsStream without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + ]; + client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificateRevocationListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CertificateRevocationList[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1.CertificateRevocationList + ) => { + 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.listCertificateRevocationLists + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listCertificateRevocationLists, + request + ) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificateRevocationListsStream with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificateRevocationListsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CertificateRevocationList[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1.CertificateRevocationList + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub) + .getCall(0) + .calledWith( + client.innerApiCalls.listCertificateRevocationLists, + request + ) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateRevocationLists without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateRevocationList() + ), + ]; + client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] = []; + const iterable = client.listCertificateRevocationListsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateRevocationLists with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificateRevocationListsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('listCertificateTemplates', () => { + it('invokes listCertificateTemplates without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + ]; + client.innerApiCalls.listCertificateTemplates = stubSimpleCall( + expectedResponse + ); + const [response] = await client.listCertificateTemplates(request); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateTemplates without error using callback', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + ]; + client.innerApiCalls.listCertificateTemplates = stubSimpleCallWithCallback( + expectedResponse + ); + const promise = new Promise((resolve, reject) => { + client.listCertificateTemplates( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.security.privateca.v1.ICertificateTemplate[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.listCertificateTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes listCertificateTemplates with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.listCertificateTemplates = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listCertificateTemplates(request), + expectedError + ); + assert( + (client.innerApiCalls.listCertificateTemplates as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes listCertificateTemplatesStream without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + ]; + client.descriptors.page.listCertificateTemplates.createStream = stubPageStreamingCall( + expectedResponse + ); + const stream = client.listCertificateTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CertificateTemplate[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1.CertificateTemplate + ) => { + 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.listCertificateTemplates + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificateTemplates, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateTemplates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('invokes listCertificateTemplatesStream with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateTemplates.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listCertificateTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.security.privateca.v1.CertificateTemplate[] = []; + stream.on( + 'data', + ( + response: protos.google.cloud.security.privateca.v1.CertificateTemplate + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCertificateTemplates + .createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCertificateTemplates, request) + ); + assert.strictEqual( + (client.descriptors.page.listCertificateTemplates + .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateTemplates without error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CertificateTemplate() + ), + ]; + client.descriptors.page.listCertificateTemplates.asyncIterate = stubAsyncIterationCall( + expectedResponse + ); + const responses: protos.google.cloud.security.privateca.v1.ICertificateTemplate[] = []; + const iterable = client.listCertificateTemplatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + + it('uses async iteration with listCertificateTemplates with error', async () => { + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('expected'); + client.descriptors.page.listCertificateTemplates.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError + ); + const iterable = client.listCertificateTemplatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.security.privateca.v1.ICertificateTemplate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub).getCall(0).args[1], + request + ); + assert.strictEqual( + (client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ + 'x-goog-request-params' + ], + expectedHeaderRequestParams + ); + }); + }); + + describe('Path templates', () => { + describe('caPool', () => { + const fakePath = '/rendered/path/caPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + ca_pool: 'caPoolValue', + }; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.caPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.caPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('caPoolPath', () => { + const result = client.caPoolPath( + 'projectValue', + 'locationValue', + 'caPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.caPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCaPoolName', () => { + const result = client.matchProjectFromCaPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCaPoolName', () => { + const result = client.matchLocationFromCaPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCaPoolFromCaPoolName', () => { + const result = client.matchCaPoolFromCaPoolName(fakePath); + assert.strictEqual(result, 'caPoolValue'); + assert( + (client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('certificate', () => { + const fakePath = '/rendered/path/certificate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + ca_pool: 'caPoolValue', + certificate: 'certificateValue', + }; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificatePath', () => { + const result = client.certificatePath( + 'projectValue', + 'locationValue', + 'caPoolValue', + 'certificateValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificatePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateName', () => { + const result = client.matchProjectFromCertificateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateName', () => { + const result = client.matchLocationFromCertificateName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCaPoolFromCertificateName', () => { + const result = client.matchCaPoolFromCertificateName(fakePath); + assert.strictEqual(result, 'caPoolValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateFromCertificateName', () => { + const result = client.matchCertificateFromCertificateName(fakePath); + assert.strictEqual(result, 'certificateValue'); + assert( + (client.pathTemplates.certificatePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('certificateAuthority', () => { + const fakePath = '/rendered/path/certificateAuthority'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + ca_pool: 'caPoolValue', + certificate_authority: 'certificateAuthorityValue', + }; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificateAuthorityPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificateAuthorityPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificateAuthorityPath', () => { + const result = client.certificateAuthorityPath( + 'projectValue', + 'locationValue', + 'caPoolValue', + 'certificateAuthorityValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateAuthorityName', () => { + const result = client.matchProjectFromCertificateAuthorityName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateAuthorityName', () => { + const result = client.matchLocationFromCertificateAuthorityName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCaPoolFromCertificateAuthorityName', () => { + const result = client.matchCaPoolFromCertificateAuthorityName(fakePath); + assert.strictEqual(result, 'caPoolValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateAuthorityFromCertificateAuthorityName', () => { + const result = client.matchCertificateAuthorityFromCertificateAuthorityName( + fakePath + ); + assert.strictEqual(result, 'certificateAuthorityValue'); + assert( + (client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('certificateRevocationList', () => { + const fakePath = '/rendered/path/certificateRevocationList'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + ca_pool: 'caPoolValue', + certificate_authority: 'certificateAuthorityValue', + certificate_revocation_list: 'certificateRevocationListValue', + }; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificateRevocationListPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificateRevocationListPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificateRevocationListPath', () => { + const result = client.certificateRevocationListPath( + 'projectValue', + 'locationValue', + 'caPoolValue', + 'certificateAuthorityValue', + 'certificateRevocationListValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateRevocationListName', () => { + const result = client.matchProjectFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateRevocationListName', () => { + const result = client.matchLocationFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCaPoolFromCertificateRevocationListName', () => { + const result = client.matchCaPoolFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'caPoolValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateAuthorityFromCertificateRevocationListName', () => { + const result = client.matchCertificateAuthorityFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'certificateAuthorityValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateRevocationListFromCertificateRevocationListName', () => { + const result = client.matchCertificateRevocationListFromCertificateRevocationListName( + fakePath + ); + assert.strictEqual(result, 'certificateRevocationListValue'); + assert( + (client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('certificateTemplate', () => { + const fakePath = '/rendered/path/certificateTemplate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + certificate_template: 'certificateTemplateValue', + }; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.certificateTemplatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.certificateTemplatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('certificateTemplatePath', () => { + const result = client.certificateTemplatePath( + 'projectValue', + 'locationValue', + 'certificateTemplateValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.certificateTemplatePathTemplate + .render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCertificateTemplateName', () => { + const result = client.matchProjectFromCertificateTemplateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.certificateTemplatePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCertificateTemplateName', () => { + const result = client.matchLocationFromCertificateTemplateName( + fakePath + ); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.certificateTemplatePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCertificateTemplateFromCertificateTemplateName', () => { + const result = client.matchCertificateTemplateFromCertificateTemplateName( + fakePath + ); + assert.strictEqual(result, 'certificateTemplateValue'); + assert( + (client.pathTemplates.certificateTemplatePathTemplate + .match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('location', () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + 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 cc43b4fc4da0ba388522ae761ecb62478be9ddc7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 14 Apr 2021 23:54:10 +0200 Subject: [PATCH 031/113] chore(deps): update dependency @types/sinon to v10 (#68) [![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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 97af3d1a04c..ff7d41d20e7 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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": "^2.0.2", "jsdoc": "^3.6.5", From 45667d30cc7e0111af085f7d9ff502fdf10d298e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 15 Apr 2021 12:55:42 -0700 Subject: [PATCH 032/113] chore: release 2.2.0 (#64) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index e0642aa34bc..fc659dfb371 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.2.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.1.0...v2.2.0) (2021-04-14) + + +### Features + +* Publish Certificate Authority Service V1 API ([#62](https://www.github.com/googleapis/nodejs-security-private-ca/issues/62)) ([5a7d9ca](https://www.github.com/googleapis/nodejs-security-private-ca/commit/5a7d9ca566c7241ced4f836d054386e3e1843e8f)) + ## [2.1.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.0.1...v2.1.0) (2021-01-09) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index ff7d41d20e7..9180dbb611b 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.1.0", + "version": "2.2.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 2432fb8f8fa..c2bc745b8b1 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.1.0" + "@google-cloud/security-private-ca": "^2.2.0" }, "devDependencies": { "c8": "^7.1.0", From b8e7080d829e9ab50a95032067953cd5334fce86 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Apr 2021 00:56:47 +0200 Subject: [PATCH 033/113] chore(deps): update dependency ts-loader to v9 (#73) [![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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 9180dbb611b..79fb9d1d2ef 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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", "webpack": "^5.0.0", "webpack-cli": "^4.0.0" From fb3e44fd43fe8c628c98691abf0725df42168a92 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 21 Apr 2021 10:16:58 -0700 Subject: [PATCH 034/113] feat: Refactored Elliptic Key curves to provide additional options, the NamedCurve enum is replaced by the EcKeyType message. (#70) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Refactored Elliptic Key curves to provide additional options, the NamedCurve enum is replaced by the EcKeyType message. PiperOrigin-RevId: 368757092 Source-Link: https://github.com/googleapis/googleapis/commit/b1c23ed98caaae6b5d0cf75649afc803bda141f3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/bc6d9ba6905ab00b99f44cd31f50349e5e3b9f11 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- .../security/privateca/v1/resources.proto | 41 +- .../cloud/security/privateca/v1/service.proto | 654 +++++++---------- .../protos/protos.d.ts | 109 ++- .../protos/protos.js | 287 ++++++-- .../protos/protos.json | 27 +- .../certificate_authority_service_client.ts | 684 ++++++++---------- 6 files changed, 926 insertions(+), 876 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto index f0cd7a31a9e..4da13f433ce 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto @@ -290,20 +290,31 @@ message CaPool { int64 max_modulus_size = 2 [(google.api.field_behavior) = OPTIONAL]; } - // Describes a named Elliptic Curve that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] + // Describes an Elliptic Curve key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] // issued from a [CaPool][google.cloud.security.privateca.v1.CaPool]. - enum NamedCurve { - // Not specified. - NAMED_CURVE_UNSPECIFIED = 0; - - // Refers to the NIST P-256 curve. - ECDSA_P256 = 2; - - // Refers to the NIST P-384 curve. - ECDSA_P384 = 3; - - // Refers to the Ed25519 curve, as described in RFC 8410. - EDDSA_25519 = 4; + message EcKeyType { + // Describes an elliptic curve-based signature algorithm that may be + // used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued from a [CaPool][google.cloud.security.privateca.v1.CaPool]. + enum EcSignatureAlgorithm { + // Not specified. Signifies that any signature algorithm may be used. + EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + + // Refers to the Elliptic Curve Digital Signature Algorithm over the + // NIST P-256 curve. + ECDSA_P256 = 1; + + // Refers to the Elliptic Curve Digital Signature Algorithm over the + // NIST P-384 curve. + ECDSA_P384 = 2; + + // Refers to the Edwards-curve Digital Signature Algorithm over curve + // 25519, as described in RFC 8410. + EDDSA_25519 = 3; + } + + // Optional. A signature algorithm that must be used. If this is omitted, any + // EC-based signature algorithm will be allowed. + EcSignatureAlgorithm signature_algorithm = 1 [(google.api.field_behavior) = OPTIONAL]; } oneof key_type { @@ -311,7 +322,7 @@ message CaPool { RsaKeyType rsa = 1; // Represents an allowed Elliptic Curve key type. - NamedCurve elliptic_curve = 2; + EcKeyType elliptic_curve = 2; } } @@ -1102,6 +1113,6 @@ enum SubjectRequestMode { // on the caller's identity. This mode will ignore any explicitly specified // [Subject][google.cloud.security.privateca.v1.Subject] and/or [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] in the certificate request. // This mode requires the caller to have the - // `privateca.certificates.createReflected` permission. + // `privateca.certificates.createForSelf` permission. REFLECTED_SPIFFE = 2; } diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto index f98383ec46d..1c1fb75bf88 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto @@ -35,16 +35,13 @@ option java_package = "com.google.cloud.security.privateca.v1"; option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\v1"; option ruby_package = "Google::Cloud::Security::PrivateCA::v1"; -// [Certificate Authority -// Service][google.cloud.security.privateca.v1.CertificateAuthorityService] -// manages private certificate authorities and issued certificates. +// [Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private +// certificate authorities and issued certificates. service CertificateAuthorityService { option (google.api.default_host) = "privateca.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] - // in a given Project, Location from a particular + // Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular // [CaPool][google.cloud.security.privateca.v1.CaPool]. rpc CreateCertificate(CreateCertificateRequest) returns (Certificate) { option (google.api.http) = { @@ -63,8 +60,7 @@ service CertificateAuthorityService { } // Lists [Certificates][google.cloud.security.privateca.v1.Certificate]. - rpc ListCertificates(ListCertificatesRequest) - returns (ListCertificatesResponse) { + rpc ListCertificates(ListCertificatesRequest) returns (ListCertificatesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/caPools/*}/certificates" }; @@ -80,8 +76,7 @@ service CertificateAuthorityService { option (google.api.method_signature) = "name"; } - // Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. - // Currently, the only field you can update is the + // Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the // [labels][google.cloud.security.privateca.v1.Certificate.labels] field. rpc UpdateCertificate(UpdateCertificateRequest) returns (Certificate) { option (google.api.http) = { @@ -91,18 +86,13 @@ service CertificateAuthorityService { option (google.api.method_signature) = "certificate,update_mask"; } - // Activate a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // that is in state + // Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state // [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] - // and is of type - // [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. - // After the parent Certificate Authority signs a certificate signing request - // from - // [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], - // this method can complete the activation process. - rpc ActivateCertificateAuthority(ActivateCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After + // the parent Certificate Authority signs a certificate signing request from + // [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation + // process. + rpc ActivateCertificateAuthority(ActivateCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:activate" body: "*" @@ -114,27 +104,21 @@ service CertificateAuthorityService { }; } - // Create a new - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in a given Project and Location. - rpc CreateCertificateAuthority(CreateCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location. + rpc CreateCertificateAuthority(CreateCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities" body: "certificate_authority" }; - option (google.api.method_signature) = - "parent,certificate_authority,certificate_authority_id"; + option (google.api.method_signature) = "parent,certificate_authority,certificate_authority_id"; option (google.longrunning.operation_info) = { response_type: "CertificateAuthority" metadata_type: "OperationMetadata" }; } - // Disable a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc DisableCertificateAuthority(DisableCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc DisableCertificateAuthority(DisableCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:disable" body: "*" @@ -146,10 +130,8 @@ service CertificateAuthorityService { }; } - // Enable a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc EnableCertificateAuthority(EnableCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc EnableCertificateAuthority(EnableCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:enable" body: "*" @@ -161,50 +143,38 @@ service CertificateAuthorityService { }; } - // Fetch a certificate signing request (CSR) from a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] // that is in state // [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] - // and is of type - // [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. - // The CSR must then be signed by the desired parent Certificate Authority, - // which could be another - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // resource, or could be an on-prem certificate authority. See also - // [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. - rpc FetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest) - returns (FetchCertificateAuthorityCsrResponse) { + // and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The + // CSR must then be signed by the desired parent Certificate Authority, which + // could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem + // certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. + rpc FetchCertificateAuthorityCsr(FetchCertificateAuthorityCsrRequest) returns (FetchCertificateAuthorityCsrResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:fetch" }; option (google.api.method_signature) = "name"; } - // Returns a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc GetCertificateAuthority(GetCertificateAuthorityRequest) - returns (CertificateAuthority) { + // Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc GetCertificateAuthority(GetCertificateAuthorityRequest) returns (CertificateAuthority) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" }; option (google.api.method_signature) = "name"; } - // Lists - // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc ListCertificateAuthorities(ListCertificateAuthoritiesRequest) - returns (ListCertificateAuthoritiesResponse) { + // Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc ListCertificateAuthorities(ListCertificateAuthoritiesRequest) returns (ListCertificateAuthoritiesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/caPools/*}/certificateAuthorities" }; option (google.api.method_signature) = "parent"; } - // Undelete a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // that has been deleted. - rpc UndeleteCertificateAuthority(UndeleteCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted. + rpc UndeleteCertificateAuthority(UndeleteCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}:undelete" body: "*" @@ -216,10 +186,8 @@ service CertificateAuthorityService { }; } - // Delete a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc DeleteCertificateAuthority(DeleteCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc DeleteCertificateAuthority(DeleteCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" }; @@ -230,10 +198,8 @@ service CertificateAuthorityService { }; } - // Update a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. - rpc UpdateCertificateAuthority(UpdateCertificateAuthorityRequest) - returns (google.longrunning.Operation) { + // Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. + rpc UpdateCertificateAuthority(UpdateCertificateAuthorityRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{certificate_authority.name=projects/*/locations/*/caPools/*/certificateAuthorities/*}" body: "certificate_authority" @@ -299,10 +265,8 @@ service CertificateAuthorityService { }; } - // FetchCaCerts returns the current trust anchor for the - // [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA - // certificate chains for all ACTIVE - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will + // include CA certificate chains for all ACTIVE [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] // resources in the [CaPool][google.cloud.security.privateca.v1.CaPool]. rpc FetchCaCerts(FetchCaCertsRequest) returns (FetchCaCertsResponse) { option (google.api.http) = { @@ -312,63 +276,50 @@ service CertificateAuthorityService { option (google.api.method_signature) = "ca_pool"; } - // Returns a - // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. - rpc GetCertificateRevocationList(GetCertificateRevocationListRequest) - returns (CertificateRevocationList) { + // Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc GetCertificateRevocationList(GetCertificateRevocationListRequest) returns (CertificateRevocationList) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}" }; option (google.api.method_signature) = "name"; } - // Lists - // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. - rpc ListCertificateRevocationLists(ListCertificateRevocationListsRequest) - returns (ListCertificateRevocationListsResponse) { + // Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc ListCertificateRevocationLists(ListCertificateRevocationListsRequest) returns (ListCertificateRevocationListsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/caPools/*/certificateAuthorities/*}/certificateRevocationLists" }; option (google.api.method_signature) = "parent"; } - // Update a - // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. - rpc UpdateCertificateRevocationList(UpdateCertificateRevocationListRequest) - returns (google.longrunning.Operation) { + // Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. + rpc UpdateCertificateRevocationList(UpdateCertificateRevocationListRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{certificate_revocation_list.name=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}" body: "certificate_revocation_list" }; - option (google.api.method_signature) = - "certificate_revocation_list,update_mask"; + option (google.api.method_signature) = "certificate_revocation_list,update_mask"; option (google.longrunning.operation_info) = { response_type: "CertificateRevocationList" metadata_type: "OperationMetadata" }; } - // Create a new - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] - // in a given Project and Location. - rpc CreateCertificateTemplate(CreateCertificateTemplateRequest) - returns (google.longrunning.Operation) { + // Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location. + rpc CreateCertificateTemplate(CreateCertificateTemplateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/certificateTemplates" body: "certificate_template" }; - option (google.api.method_signature) = - "parent,certificate_template,certificate_template_id"; + option (google.api.method_signature) = "parent,certificate_template,certificate_template_id"; option (google.longrunning.operation_info) = { response_type: "CertificateTemplate" metadata_type: "OperationMetadata" }; } - // DeleteCertificateTemplate deletes a - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc DeleteCertificateTemplate(DeleteCertificateTemplateRequest) - returns (google.longrunning.Operation) { + // DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc DeleteCertificateTemplate(DeleteCertificateTemplateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/certificateTemplates/*}" }; @@ -379,30 +330,24 @@ service CertificateAuthorityService { }; } - // Returns a - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc GetCertificateTemplate(GetCertificateTemplateRequest) - returns (CertificateTemplate) { + // Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc GetCertificateTemplate(GetCertificateTemplateRequest) returns (CertificateTemplate) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/certificateTemplates/*}" }; option (google.api.method_signature) = "name"; } - // Lists - // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc ListCertificateTemplates(ListCertificateTemplatesRequest) - returns (ListCertificateTemplatesResponse) { + // Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc ListCertificateTemplates(ListCertificateTemplatesRequest) returns (ListCertificateTemplatesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/certificateTemplates" }; option (google.api.method_signature) = "parent"; } - // Update a - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. - rpc UpdateCertificateTemplate(UpdateCertificateTemplateRequest) - returns (google.longrunning.Operation) { + // Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. + rpc UpdateCertificateTemplate(UpdateCertificateTemplateRequest) returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{certificate_template.name=projects/*/locations/*/certificateTemplates/*}" body: "certificate_template" @@ -415,13 +360,10 @@ service CertificateAuthorityService { } } -// Request message for -// [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate]. +// Request message for [CertificateAuthorityService.CreateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate]. message CreateCertificateRequest { - // Required. The resource name of the - // [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the - // [Certificate][google.cloud.security.privateca.v1.Certificate], in the - // format `projects/*/locations/*/caPools/*`. + // Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], + // in the format `projects/*/locations/*/caPools/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -431,20 +373,17 @@ message CreateCertificateRequest { // Optional. It must be unique within a location and match the regular // expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the Enterprise - // [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier], but is - // optional and its value is ignored otherwise. + // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][], + // but is optional and its value is ignored otherwise. string certificate_id = 2 [(google.api.field_behavior) = OPTIONAL]; - // Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] - // with initial field values. + // Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values. Certificate certificate = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -456,45 +395,29 @@ message CreateCertificateRequest { // not supported (00000000-0000-0000-0000-000000000000). string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If this is true, no - // [Certificate][google.cloud.security.privateca.v1.Certificate] resource will - // be persisted regardless of the - // [CaPool][google.cloud.security.privateca.v1.CaPool]'s - // [tier][google.cloud.security.privateca.v1.CaPool.tier], and the returned - // [Certificate][google.cloud.security.privateca.v1.Certificate] will not - // contain the - // [pem_certificate][google.cloud.security.privateca.v1.Certificate.pem_certificate] - // field. + // Optional. If this is true, no [Certificate][google.cloud.security.privateca.v1.Certificate] resource will be persisted regardless + // of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s [tier][google.cloud.security.privateca.v1.CaPool.tier], and the returned [Certificate][google.cloud.security.privateca.v1.Certificate] + // will not contain the [pem_certificate][google.cloud.security.privateca.v1.Certificate.pem_certificate] field. bool validate_only = 5 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The resource ID of the - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // that should issue the certificate. This optional field will ignore the - // load-balancing scheme of the Pool and directly issue the certificate from - // the CA with the specified ID, contained in the same - // [CaPool][google.cloud.security.privateca.v1.CaPool] referenced by `parent`. - // Per-CA quota rules apply. If left empty, a - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // will be chosen from the [CaPool][google.cloud.security.privateca.v1.CaPool] - // by the service. For example, to issue a - // [Certificate][google.cloud.security.privateca.v1.Certificate] from a - // Certificate Authority with resource name + // Optional. The resource ID of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that should issue the + // certificate. This optional field will ignore the load-balancing scheme of + // the Pool and directly issue the certificate from the CA with the specified + // ID, contained in the same [CaPool][google.cloud.security.privateca.v1.CaPool] referenced by `parent`. Per-CA quota + // rules apply. If left empty, a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will be chosen from + // the [CaPool][google.cloud.security.privateca.v1.CaPool] by the service. For example, to issue a [Certificate][google.cloud.security.privateca.v1.Certificate] from + // a Certificate Authority with resource name // "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", - // you can set the - // [parent][google.cloud.security.privateca.v1.CreateCertificateRequest.parent] - // to "projects/my-project/locations/us-central1/caPools/my-pool" and the - // [issuing_certificate_authority_id][google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id] - // to "my-ca". - string issuing_certificate_authority_id = 6 - [(google.api.field_behavior) = OPTIONAL]; + // you can set the [parent][google.cloud.security.privateca.v1.CreateCertificateRequest.parent] to + // "projects/my-project/locations/us-central1/caPools/my-pool" and the + // [issuing_certificate_authority_id][google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id] to "my-ca". + string issuing_certificate_authority_id = 6 [(google.api.field_behavior) = OPTIONAL]; } // Request message for // [CertificateAuthorityService.GetCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate]. message GetCertificateRequest { - // Required. The [name][google.cloud.security.privateca.v1.Certificate.name] - // of the [Certificate][google.cloud.security.privateca.v1.Certificate] to - // get. + // Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -503,12 +426,11 @@ message GetCertificateRequest { ]; } -// Request message for -// [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates]. +// Request message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates]. message ListCertificatesRequest { // Required. The resource name of the location associated with the - // [Certificates][google.cloud.security.privateca.v1.Certificate], in the - // format `projects/*/locations/*/caPools/*`. + // [Certificates][google.cloud.security.privateca.v1.Certificate], in the format + // `projects/*/locations/*/caPools/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -517,32 +439,29 @@ message ListCertificatesRequest { ]; // Optional. Limit on the number of - // [Certificates][google.cloud.security.privateca.v1.Certificate] to include - // in the response. Further - // [Certificates][google.cloud.security.privateca.v1.Certificate] can - // subsequently be obtained by including the - // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token] - // in a subsequent request. If unspecified, the server will pick an - // appropriate default. + // [Certificates][google.cloud.security.privateca.v1.Certificate] to include in the + // response. Further [Certificates][google.cloud.security.privateca.v1.Certificate] can subsequently be obtained + // by including the + // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Pagination token, returned earlier via // [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token]. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Only include resources that match the filter in the response. For - // details on supported filters and syntax, see [Certificates Filtering + // Optional. Only include resources that match the filter in the response. For details + // on supported filters and syntax, see [Certificates Filtering // documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). string filter = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Specify how the results should be sorted. For details on - // supported fields and syntax, see [Certificates Sorting + // Optional. Specify how the results should be sorted. For details on supported fields + // and syntax, see [Certificates Sorting // documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } -// Response message for -// [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates]. +// Response message for [CertificateAuthorityService.ListCertificates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates]. message ListCertificatesResponse { // The list of [Certificates][google.cloud.security.privateca.v1.Certificate]. repeated Certificate certificates = 1; @@ -559,8 +478,8 @@ message ListCertificatesResponse { // Request message for // [CertificateAuthorityService.RevokeCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate]. message RevokeCertificateRequest { - // Required. The resource name for this - // [Certificate][google.cloud.security.privateca.v1.Certificate] in the format + // Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the + // format // `projects/*/locations/*/caPools/*/certificates/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, @@ -569,15 +488,13 @@ message RevokeCertificateRequest { } ]; - // Required. The - // [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] for - // revoking this certificate. + // Required. The [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] for revoking this certificate. RevocationReason reason = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -590,21 +507,18 @@ message RevokeCertificateRequest { string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; } -// Request message for -// [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate]. +// Request message for [CertificateAuthorityService.UpdateCertificate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate]. message UpdateCertificateRequest { - // Required. [Certificate][google.cloud.security.privateca.v1.Certificate] - // with updated values. + // Required. [Certificate][google.cloud.security.privateca.v1.Certificate] with updated values. Certificate certificate = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -620,9 +534,8 @@ message UpdateCertificateRequest { // Request message for // [CertificateAuthorityService.ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority]. message ActivateCertificateAuthorityRequest { - // Required. The resource name for this - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -634,15 +547,14 @@ message ActivateCertificateAuthorityRequest { // [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr]. string pem_ca_certificate = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. Must include information about the issuer of - // 'pem_ca_certificate', and any further issuers until the self-signed CA. - SubordinateConfig subordinate_config = 3 - [(google.api.field_behavior) = REQUIRED]; + // Required. Must include information about the issuer of 'pem_ca_certificate', and any + // further issuers until the self-signed CA. + SubordinateConfig subordinate_config = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -658,10 +570,9 @@ message ActivateCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.CreateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority]. message CreateCertificateAuthorityRequest { - // Required. The resource name of the - // [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the - // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], - // in the format `projects/*/locations/*/caPools/*`. + // Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format + // `projects/*/locations/*/caPools/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -673,16 +584,13 @@ message CreateCertificateAuthorityRequest { // expression `[a-zA-Z0-9_-]{1,63}` string certificate_authority_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // with initial field values. - CertificateAuthority certificate_authority = 3 - [(google.api.field_behavior) = REQUIRED]; + // Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values. + CertificateAuthority certificate_authority = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -698,9 +606,8 @@ message CreateCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.DisableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority]. message DisableCertificateAuthorityRequest { - // Required. The resource name for this - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -708,10 +615,10 @@ message DisableCertificateAuthorityRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -727,9 +634,8 @@ message DisableCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.EnableCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority]. message EnableCertificateAuthorityRequest { - // Required. The resource name for this - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -737,10 +643,10 @@ message EnableCertificateAuthorityRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -756,9 +662,8 @@ message EnableCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr]. message FetchCertificateAuthorityCsrRequest { - // Required. The resource name for this - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -774,13 +679,10 @@ message FetchCertificateAuthorityCsrResponse { string pem_csr = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// Request message for -// [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority]. +// Request message for [CertificateAuthorityService.GetCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority]. message GetCertificateAuthorityRequest { - // Required. The - // [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // to get. + // Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to + // get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -792,10 +694,9 @@ message GetCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities]. message ListCertificateAuthoritiesRequest { - // Required. The resource name of the - // [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the - // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], - // in the format `projects/*/locations/*/caPools/*`. + // Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format + // `projects/*/locations/*/caPools/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -803,14 +704,12 @@ message ListCertificateAuthoritiesRequest { } ]; - // Optional. Limit on the number of - // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] - // to include in the response. Further - // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] - // can subsequently be obtained by including the - // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token] - // in a subsequent request. If unspecified, the server will pick an - // appropriate default. + // Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] to + // include in the response. + // Further [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] can subsequently be + // obtained by including the + // [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Pagination token, returned earlier via @@ -827,8 +726,7 @@ message ListCertificateAuthoritiesRequest { // Response message for // [CertificateAuthorityService.ListCertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities]. message ListCertificateAuthoritiesResponse { - // The list of - // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. + // The list of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]. repeated CertificateAuthority certificate_authorities = 1; // A token to retrieve next page of results. Pass this value in @@ -843,9 +741,8 @@ message ListCertificateAuthoritiesResponse { // Request message for // [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority]. message UndeleteCertificateAuthorityRequest { - // Required. The resource name for this - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -853,10 +750,10 @@ message UndeleteCertificateAuthorityRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -872,9 +769,8 @@ message UndeleteCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.DeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority]. message DeleteCertificateAuthorityRequest { - // Required. The resource name for this - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -882,10 +778,10 @@ message DeleteCertificateAuthorityRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -905,20 +801,16 @@ message DeleteCertificateAuthorityRequest { // Request message for // [CertificateAuthorityService.UpdateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority]. message UpdateCertificateAuthorityRequest { - // Required. - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] - // with updated values. - CertificateAuthority certificate_authority = 1 - [(google.api.field_behavior) = REQUIRED]; + // Required. [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with updated values. + CertificateAuthority certificate_authority = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -935,8 +827,7 @@ message UpdateCertificateAuthorityRequest { // [CertificateAuthorityService.CreateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool]. message CreateCaPoolRequest { // Required. The resource name of the location associated with the - // [CaPool][google.cloud.security.privateca.v1.CaPool], in the format - // `projects/*/locations/*`. + // [CaPool][google.cloud.security.privateca.v1.CaPool], in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -948,14 +839,13 @@ message CreateCaPoolRequest { // expression `[a-zA-Z0-9_-]{1,63}` string ca_pool_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with - // initial field values. + // Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values. CaPool ca_pool = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -971,18 +861,16 @@ message CreateCaPoolRequest { // Request message for // [CertificateAuthorityService.UpdateCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool]. message UpdateCaPoolRequest { - // Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated - // values. + // Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated values. CaPool ca_pool = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -998,9 +886,8 @@ message UpdateCaPoolRequest { // Request message for // [CertificateAuthorityService.DeleteCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool]. message DeleteCaPoolRequest { - // Required. The resource name for this - // [CaPool][google.cloud.security.privateca.v1.CaPool] in the format - // `projects/*/locations/*/caPools/*`. + // Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the + // format `projects/*/locations/*/caPools/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1008,10 +895,10 @@ message DeleteCaPoolRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -1027,9 +914,8 @@ message DeleteCaPoolRequest { // Request message for // [CertificateAuthorityService.FetchCaCerts][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts]. message FetchCaCertsRequest { - // Required. The resource name for the - // [CaPool][google.cloud.security.privateca.v1.CaPool] in the format - // `projects/*/locations/*/caPools/*`. + // Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the + // format `projects/*/locations/*/caPools/*`. string ca_pool = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1037,10 +923,10 @@ message FetchCaCertsRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -1062,17 +948,14 @@ message FetchCaCertsResponse { } // The PEM encoded CA certificate chains of all - // [ACTIVE][CertificateAuthority.State.ACTIVE] - // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] + // [ACTIVE][CertificateAuthority.State.ACTIVE] [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] // resources in this [CaPool][google.cloud.security.privateca.v1.CaPool]. repeated CertChain ca_certs = 1; } -// Request message for -// [CertificateAuthorityService.GetCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool]. +// Request message for [CertificateAuthorityService.GetCaPool][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool]. message GetCaPoolRequest { - // Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the - // [CaPool][google.cloud.security.privateca.v1.CaPool] to get. + // Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1094,13 +977,12 @@ message ListCaPoolsRequest { } ]; - // Optional. Limit on the number of - // [CaPools][google.cloud.security.privateca.v1.CaPool] to include in the - // response. Further [CaPools][google.cloud.security.privateca.v1.CaPool] can - // subsequently be obtained by including the - // [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token] - // in a subsequent request. If unspecified, the server will pick an - // appropriate default. + // Optional. Limit on the number of [CaPools][google.cloud.security.privateca.v1.CaPool] to + // include in the response. + // Further [CaPools][google.cloud.security.privateca.v1.CaPool] can subsequently be + // obtained by including the + // [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Pagination token, returned earlier via @@ -1132,11 +1014,8 @@ message ListCaPoolsResponse { // Request message for // [CertificateAuthorityService.GetCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList]. message GetCertificateRevocationListRequest { - // Required. The - // [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] - // of the - // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] - // to get. + // Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the + // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1149,8 +1028,8 @@ message GetCertificateRevocationListRequest { // [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists]. message ListCertificateRevocationListsRequest { // Required. The resource name of the location associated with the - // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], - // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`. + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format + // `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1159,13 +1038,11 @@ message ListCertificateRevocationListsRequest { ]; // Optional. Limit on the number of - // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] - // to include in the response. Further - // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] + // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] to include in the + // response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] // can subsequently be obtained by including the - // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token] - // in a subsequent request. If unspecified, the server will pick an - // appropriate default. + // [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Pagination token, returned earlier via @@ -1182,8 +1059,7 @@ message ListCertificateRevocationListsRequest { // Response message for // [CertificateAuthorityService.ListCertificateRevocationLists][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists]. message ListCertificateRevocationListsResponse { - // The list of - // [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. + // The list of [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList]. repeated CertificateRevocationList certificate_revocation_lists = 1; // A token to retrieve next page of results. Pass this value in @@ -1198,20 +1074,16 @@ message ListCertificateRevocationListsResponse { // Request message for // [CertificateAuthorityService.UpdateCertificateRevocationList][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList]. message UpdateCertificateRevocationListRequest { - // Required. - // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] - // with updated values. - CertificateRevocationList certificate_revocation_list = 1 - [(google.api.field_behavior) = REQUIRED]; + // Required. [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] with updated values. + CertificateRevocationList certificate_revocation_list = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -1228,8 +1100,8 @@ message UpdateCertificateRevocationListRequest { // [CertificateAuthorityService.CreateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate]. message CreateCertificateTemplateRequest { // Required. The resource name of the location associated with the - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], - // in the format `projects/*/locations/*`. + // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format + // `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1241,16 +1113,13 @@ message CreateCertificateTemplateRequest { // expression `[a-zA-Z0-9_-]{1,63}` string certificate_template_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. A - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] - // with initial field values. - CertificateTemplate certificate_template = 3 - [(google.api.field_behavior) = REQUIRED]; + // Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values. + CertificateTemplate certificate_template = 3 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -1266,9 +1135,8 @@ message CreateCertificateTemplateRequest { // Request message for // [CertificateAuthorityService.DeleteCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate]. message DeleteCertificateTemplateRequest { - // Required. The resource name for this - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] - // in the format `projects/*/locations/*/certificateTemplates/*`. + // Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format + // `projects/*/locations/*/certificateTemplates/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1276,10 +1144,10 @@ message DeleteCertificateTemplateRequest { } ]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -1295,10 +1163,8 @@ message DeleteCertificateTemplateRequest { // Request message for // [CertificateAuthorityService.GetCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate]. message GetCertificateTemplateRequest { - // Required. The - // [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] - // to get. + // Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to + // get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1311,8 +1177,8 @@ message GetCertificateTemplateRequest { // [CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates]. message ListCertificateTemplatesRequest { // Required. The resource name of the location associated with the - // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], - // in the format `projects/*/locations/*`. + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format + // `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1321,13 +1187,11 @@ message ListCertificateTemplatesRequest { ]; // Optional. Limit on the number of - // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] - // to include in the response. Further - // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] - // can subsequently be obtained by including the - // [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token] - // in a subsequent request. If unspecified, the server will pick an - // appropriate default. + // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] to include in the response. + // Further [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] can subsequently be + // obtained by including the + // [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token] in a subsequent + // request. If unspecified, the server will pick an appropriate default. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Pagination token, returned earlier via @@ -1344,8 +1208,7 @@ message ListCertificateTemplatesRequest { // Response message for // [CertificateAuthorityService.ListCertificateTemplates][google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates]. message ListCertificateTemplatesResponse { - // The list of - // [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. + // The list of [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate]. repeated CertificateTemplate certificate_templates = 1; // A token to retrieve next page of results. Pass this value in @@ -1360,20 +1223,16 @@ message ListCertificateTemplatesResponse { // Request message for // [CertificateAuthorityService.UpdateCertificateTemplate][google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate]. message UpdateCertificateTemplateRequest { - // Required. - // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] - // with updated values. - CertificateTemplate certificate_template = 1 - [(google.api.field_behavior) = REQUIRED]; + // Required. [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with updated values. + CertificateTemplate certificate_template = 1 [(google.api.field_behavior) = REQUIRED]; // Required. A list of fields to be updated in this request. - google.protobuf.FieldMask update_mask = 2 - [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. An ID to identify requests. Specify a unique request ID so that - // if you must retry your request, the server will know to ignore the request - // if it has already been completed. The server will guarantee that for at - // least 60 minutes since the first request. + // Optional. An ID to identify requests. Specify a unique request ID so that if you must + // retry your request, the server will know to ignore the request if it has + // already been completed. The server will guarantee that for at least 60 + // minutes since the first request. // // For example, consider a situation where you make an initial request and t // he request times out. If you make the request again with the same request @@ -1389,12 +1248,10 @@ message UpdateCertificateTemplateRequest { // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. - google.protobuf.Timestamp create_time = 1 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time the operation finished running. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Server-defined resource path for the target of the operation. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -1407,9 +1264,8 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index f4a4aee6358..3fa4b5764b7 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -784,7 +784,7 @@ export namespace google { rsa?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null); /** AllowedKeyType ellipticCurve */ - ellipticCurve?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|keyof typeof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|null); + ellipticCurve?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType|null); } /** Represents an AllowedKeyType. */ @@ -800,7 +800,7 @@ export namespace google { public rsa?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null); /** AllowedKeyType ellipticCurve. */ - public ellipticCurve: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|keyof typeof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve); + public ellipticCurve?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType|null); /** AllowedKeyType keyType. */ public keyType?: ("rsa"|"ellipticCurve"); @@ -974,12 +974,105 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** NamedCurve enum. */ - enum NamedCurve { - NAMED_CURVE_UNSPECIFIED = 0, - ECDSA_P256 = 2, - ECDSA_P384 = 3, - EDDSA_25519 = 4 + /** Properties of an EcKeyType. */ + interface IEcKeyType { + + /** EcKeyType signatureAlgorithm */ + signatureAlgorithm?: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm|keyof typeof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm|null); + } + + /** Represents an EcKeyType. */ + class EcKeyType implements IEcKeyType { + + /** + * Constructs a new EcKeyType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType); + + /** EcKeyType signatureAlgorithm. */ + public signatureAlgorithm: (google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm|keyof typeof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm); + + /** + * Creates a new EcKeyType instance using the specified properties. + * @param [properties] Properties to set + * @returns EcKeyType instance + */ + public static create(properties?: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType; + + /** + * Encodes the specified EcKeyType message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.verify|verify} messages. + * @param message EcKeyType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EcKeyType message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.verify|verify} messages. + * @param message EcKeyType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EcKeyType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EcKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType; + + /** + * Decodes an EcKeyType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EcKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType; + + /** + * Verifies an EcKeyType message. + * @param message Plain 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 EcKeyType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EcKeyType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType; + + /** + * Creates a plain object from an EcKeyType message. Also converts values to other types if specified. + * @param message EcKeyType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EcKeyType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace EcKeyType { + + /** EcSignatureAlgorithm enum. */ + enum EcSignatureAlgorithm { + EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0, + ECDSA_P256 = 1, + ECDSA_P384 = 2, + EDDSA_25519 = 3 + } } } diff --git a/packages/google-cloud-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index af56886e0ad..1195bdc6d1f 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -2273,7 +2273,7 @@ * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy * @interface IAllowedKeyType * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IRsaKeyType|null} [rsa] AllowedKeyType rsa - * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve|null} [ellipticCurve] AllowedKeyType ellipticCurve + * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType|null} [ellipticCurve] AllowedKeyType ellipticCurve */ /** @@ -2301,11 +2301,11 @@ /** * AllowedKeyType ellipticCurve. - * @member {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve} ellipticCurve + * @member {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType|null|undefined} ellipticCurve * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType * @instance */ - AllowedKeyType.prototype.ellipticCurve = 0; + AllowedKeyType.prototype.ellipticCurve = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2348,7 +2348,7 @@ if (message.rsa != null && Object.hasOwnProperty.call(message, "rsa")) $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.encode(message.rsa, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.ellipticCurve != null && Object.hasOwnProperty.call(message, "ellipticCurve")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ellipticCurve); + $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.encode(message.ellipticCurve, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; @@ -2387,7 +2387,7 @@ message.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.decode(reader, reader.uint32()); break; case 2: - message.ellipticCurve = reader.int32(); + message.ellipticCurve = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2437,14 +2437,10 @@ if (properties.keyType === 1) return "keyType: multiple values"; properties.keyType = 1; - switch (message.ellipticCurve) { - default: - return "ellipticCurve: enum value expected"; - case 0: - case 2: - case 3: - case 4: - break; + { + var error = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.verify(message.ellipticCurve); + if (error) + return "ellipticCurve." + error; } } return null; @@ -2467,23 +2463,10 @@ throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.rsa: object expected"); message.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.fromObject(object.rsa); } - switch (object.ellipticCurve) { - case "NAMED_CURVE_UNSPECIFIED": - case 0: - message.ellipticCurve = 0; - break; - case "ECDSA_P256": - case 2: - message.ellipticCurve = 2; - break; - case "ECDSA_P384": - case 3: - message.ellipticCurve = 3; - break; - case "EDDSA_25519": - case 4: - message.ellipticCurve = 4; - break; + if (object.ellipticCurve != null) { + if (typeof object.ellipticCurve !== "object") + throw TypeError(".google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.ellipticCurve: object expected"); + message.ellipticCurve = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.fromObject(object.ellipticCurve); } return message; }; @@ -2507,7 +2490,7 @@ object.keyType = "rsa"; } if (message.ellipticCurve != null && message.hasOwnProperty("ellipticCurve")) { - object.ellipticCurve = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve[message.ellipticCurve] : message.ellipticCurve; + object.ellipticCurve = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.toObject(message.ellipticCurve, options); if (options.oneofs) object.keyType = "ellipticCurve"; } @@ -2763,22 +2746,232 @@ return RsaKeyType; })(); - /** - * NamedCurve enum. - * @name google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.NamedCurve - * @enum {number} - * @property {number} NAMED_CURVE_UNSPECIFIED=0 NAMED_CURVE_UNSPECIFIED value - * @property {number} ECDSA_P256=2 ECDSA_P256 value - * @property {number} ECDSA_P384=3 ECDSA_P384 value - * @property {number} EDDSA_25519=4 EDDSA_25519 value - */ - AllowedKeyType.NamedCurve = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NAMED_CURVE_UNSPECIFIED"] = 0; - values[valuesById[2] = "ECDSA_P256"] = 2; - values[valuesById[3] = "ECDSA_P384"] = 3; - values[valuesById[4] = "EDDSA_25519"] = 4; - return values; + AllowedKeyType.EcKeyType = (function() { + + /** + * Properties of an EcKeyType. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @interface IEcKeyType + * @property {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm|null} [signatureAlgorithm] EcKeyType signatureAlgorithm + */ + + /** + * Constructs a new EcKeyType. + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @classdesc Represents an EcKeyType. + * @implements IEcKeyType + * @constructor + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType=} [properties] Properties to set + */ + function EcKeyType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EcKeyType signatureAlgorithm. + * @member {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm} signatureAlgorithm + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @instance + */ + EcKeyType.prototype.signatureAlgorithm = 0; + + /** + * Creates a new EcKeyType instance using the specified properties. + * @function create + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType=} [properties] Properties to set + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType} EcKeyType instance + */ + EcKeyType.create = function create(properties) { + return new EcKeyType(properties); + }; + + /** + * Encodes the specified EcKeyType message. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.verify|verify} messages. + * @function encode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType} message EcKeyType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EcKeyType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signatureAlgorithm != null && Object.hasOwnProperty.call(message, "signatureAlgorithm")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.signatureAlgorithm); + return writer; + }; + + /** + * Encodes the specified EcKeyType message, length delimited. Does not implicitly {@link google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.IEcKeyType} message EcKeyType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EcKeyType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EcKeyType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType} EcKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EcKeyType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signatureAlgorithm = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EcKeyType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType} EcKeyType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EcKeyType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EcKeyType message. + * @function verify + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EcKeyType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + switch (message.signatureAlgorithm) { + default: + return "signatureAlgorithm: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an EcKeyType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType} EcKeyType + */ + EcKeyType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType) + return object; + var message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType(); + switch (object.signatureAlgorithm) { + case "EC_SIGNATURE_ALGORITHM_UNSPECIFIED": + case 0: + message.signatureAlgorithm = 0; + break; + case "ECDSA_P256": + case 1: + message.signatureAlgorithm = 1; + break; + case "ECDSA_P384": + case 2: + message.signatureAlgorithm = 2; + break; + case "EDDSA_25519": + case 3: + message.signatureAlgorithm = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an EcKeyType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType} message EcKeyType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EcKeyType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.signatureAlgorithm = options.enums === String ? "EC_SIGNATURE_ALGORITHM_UNSPECIFIED" : 0; + if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) + object.signatureAlgorithm = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm[message.signatureAlgorithm] : message.signatureAlgorithm; + return object; + }; + + /** + * Converts this EcKeyType to JSON. + * @function toJSON + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @instance + * @returns {Object.} JSON object + */ + EcKeyType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * EcSignatureAlgorithm enum. + * @name google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm + * @enum {number} + * @property {number} EC_SIGNATURE_ALGORITHM_UNSPECIFIED=0 EC_SIGNATURE_ALGORITHM_UNSPECIFIED value + * @property {number} ECDSA_P256=1 ECDSA_P256 value + * @property {number} ECDSA_P384=2 ECDSA_P384 value + * @property {number} EDDSA_25519=3 EDDSA_25519 value + */ + EcKeyType.EcSignatureAlgorithm = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EC_SIGNATURE_ALGORITHM_UNSPECIFIED"] = 0; + values[valuesById[1] = "ECDSA_P256"] = 1; + values[valuesById[2] = "ECDSA_P384"] = 2; + values[valuesById[3] = "EDDSA_25519"] = 3; + return values; + })(); + + return EcKeyType; })(); return AllowedKeyType; diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 9d90ebc7540..b6d85ee19e3 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -339,7 +339,7 @@ "id": 1 }, "ellipticCurve": { - "type": "NamedCurve", + "type": "EcKeyType", "id": 2 } }, @@ -362,12 +362,25 @@ } } }, - "NamedCurve": { - "values": { - "NAMED_CURVE_UNSPECIFIED": 0, - "ECDSA_P256": 2, - "ECDSA_P384": 3, - "EDDSA_25519": 4 + "EcKeyType": { + "fields": { + "signatureAlgorithm": { + "type": "EcSignatureAlgorithm", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EcSignatureAlgorithm": { + "values": { + "EC_SIGNATURE_ALGORITHM_UNSPECIFIED": 0, + "ECDSA_P256": 1, + "ECDSA_P384": 2, + "EDDSA_25519": 3 + } + } } } } diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 16e8c6f61c6..44655cdfa33 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -42,9 +42,8 @@ import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** - * [Certificate Authority - * Service][google.cloud.security.privateca.v1.CertificateAuthorityService] - * manages private certificate authorities and issued certificates. + * {@link google.cloud.security.privateca.v1.CertificateAuthorityService|Certificate Authority Service} manages private + * certificate authorities and issued certificates. * @class * @memberof v1 */ @@ -635,32 +634,26 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Create a new {@link google.cloud.security.privateca.v1.Certificate|Certificate} - * in a given Project, Location from a particular + * Create a new {@link google.cloud.security.privateca.v1.Certificate|Certificate} in a given Project, Location from a particular * {@link google.cloud.security.privateca.v1.CaPool|CaPool}. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the - * {@link google.cloud.security.privateca.v1.Certificate|Certificate}, in the - * format `projects/* /locations/* /caPools/*`. + * Required. The resource name of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the {@link google.cloud.security.privateca.v1.Certificate|Certificate}, + * in the format `projects/* /locations/* /caPools/*`. * @param {string} [request.certificateId] * Optional. It must be unique within a location and match the regular * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the Enterprise - * {@link google.cloud.security.privateca.v1.CaPool.Tier|CaPool.Tier}, but is - * optional and its value is ignored otherwise. + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the Enterprise {@link |CertificateAuthority.Tier}, + * but is optional and its value is ignored otherwise. * @param {google.cloud.security.privateca.v1.Certificate} request.certificate - * Required. A {@link google.cloud.security.privateca.v1.Certificate|Certificate} - * with initial field values. + * Required. A {@link google.cloud.security.privateca.v1.Certificate|Certificate} with initial field values. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -671,34 +664,21 @@ export class CertificateAuthorityServiceClient { * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). * @param {boolean} [request.validateOnly] - * Optional. If this is true, no - * {@link google.cloud.security.privateca.v1.Certificate|Certificate} resource will - * be persisted regardless of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool}'s - * {@link google.cloud.security.privateca.v1.CaPool.tier|tier}, and the returned - * {@link google.cloud.security.privateca.v1.Certificate|Certificate} will not - * contain the - * {@link google.cloud.security.privateca.v1.Certificate.pem_certificate|pem_certificate} - * field. + * Optional. If this is true, no {@link google.cloud.security.privateca.v1.Certificate|Certificate} resource will be persisted regardless + * of the {@link google.cloud.security.privateca.v1.CaPool|CaPool}'s {@link google.cloud.security.privateca.v1.CaPool.tier|tier}, and the returned {@link google.cloud.security.privateca.v1.Certificate|Certificate} + * will not contain the {@link google.cloud.security.privateca.v1.Certificate.pem_certificate|pem_certificate} field. * @param {string} [request.issuingCertificateAuthorityId] - * Optional. The resource ID of the - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * that should issue the certificate. This optional field will ignore the - * load-balancing scheme of the Pool and directly issue the certificate from - * the CA with the specified ID, contained in the same - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} referenced by `parent`. - * Per-CA quota rules apply. If left empty, a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * will be chosen from the {@link google.cloud.security.privateca.v1.CaPool|CaPool} - * by the service. For example, to issue a - * {@link google.cloud.security.privateca.v1.Certificate|Certificate} from a - * Certificate Authority with resource name + * Optional. The resource ID of the {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} that should issue the + * certificate. This optional field will ignore the load-balancing scheme of + * the Pool and directly issue the certificate from the CA with the specified + * ID, contained in the same {@link google.cloud.security.privateca.v1.CaPool|CaPool} referenced by `parent`. Per-CA quota + * rules apply. If left empty, a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} will be chosen from + * the {@link google.cloud.security.privateca.v1.CaPool|CaPool} by the service. For example, to issue a {@link google.cloud.security.privateca.v1.Certificate|Certificate} from + * a Certificate Authority with resource name * "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", - * you can set the - * {@link google.cloud.security.privateca.v1.CreateCertificateRequest.parent|parent} - * to "projects/my-project/locations/us-central1/caPools/my-pool" and the - * {@link google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id|issuing_certificate_authority_id} - * to "my-ca". + * you can set the {@link google.cloud.security.privateca.v1.CreateCertificateRequest.parent|parent} to + * "projects/my-project/locations/us-central1/caPools/my-pool" and the + * {@link google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id|issuing_certificate_authority_id} to "my-ca". * @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. @@ -796,9 +776,7 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.Certificate.name|name} - * of the {@link google.cloud.security.privateca.v1.Certificate|Certificate} to - * get. + * Required. The {@link google.cloud.security.privateca.v1.Certificate.name|name} of the {@link google.cloud.security.privateca.v1.Certificate|Certificate} to get. * @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. @@ -896,18 +874,16 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.Certificate|Certificate} in the format + * Required. The resource name for this {@link google.cloud.security.privateca.v1.Certificate|Certificate} in the + * format * `projects/* /locations/* /caPools/* /certificates/*`. * @param {google.cloud.security.privateca.v1.RevocationReason} request.reason - * Required. The - * {@link google.cloud.security.privateca.v1.RevocationReason|RevocationReason} for - * revoking this certificate. + * Required. The {@link google.cloud.security.privateca.v1.RevocationReason|RevocationReason} for revoking this certificate. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -1009,22 +985,20 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Update a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. - * Currently, the only field you can update is the + * Update a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. Currently, the only field you can update is the * {@link google.cloud.security.privateca.v1.Certificate.labels|labels} field. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.security.privateca.v1.Certificate} request.certificate - * Required. {@link google.cloud.security.privateca.v1.Certificate|Certificate} - * with updated values. + * Required. {@link google.cloud.security.privateca.v1.Certificate|Certificate} with updated values. * @param {google.protobuf.FieldMask} request.updateMask * Required. A list of fields to be updated in this request. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -1126,24 +1100,19 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Fetch a certificate signing request (CSR) from a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * Fetch a certificate signing request (CSR) from a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} * that is in state * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} - * and is of type - * {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. - * The CSR must then be signed by the desired parent Certificate Authority, - * which could be another - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * resource, or could be an on-prem certificate authority. See also - * {@link google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. + * and is of type {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. The + * CSR must then be signed by the desired parent Certificate Authority, which + * could be another {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} resource, or could be an on-prem + * certificate authority. See also {@link google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @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. @@ -1240,16 +1209,13 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Returns a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * Returns a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The - * {@link google.cloud.security.privateca.v1.CertificateAuthority.name|name} of the - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * to get. + * Required. The {@link google.cloud.security.privateca.v1.CertificateAuthority.name|name} of the {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} to + * get. * @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. @@ -1348,8 +1314,7 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.CaPool.name|name} of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} to get. + * Required. The {@link google.cloud.security.privateca.v1.CaPool.name|name} of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} to get. * @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. @@ -1439,23 +1404,20 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * FetchCaCerts returns the current trust anchor for the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool}. This will include CA - * certificate chains for all ACTIVE - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * FetchCaCerts returns the current trust anchor for the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. This will + * include CA certificate chains for all ACTIVE {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} * resources in the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. * * @param {Object} request * The request object that will be sent. * @param {string} request.caPool - * Required. The resource name for the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the format - * `projects/* /locations/* /caPools/*`. + * Required. The resource name for the {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the + * format `projects/* /locations/* /caPools/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -1557,17 +1519,13 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Returns a - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. + * Returns a {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The - * {@link google.cloud.security.privateca.v1.CertificateRevocationList.name|name} - * of the - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} - * to get. + * Required. The {@link google.cloud.security.privateca.v1.CertificateRevocationList.name|name} of the + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} to get. * @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. @@ -1664,16 +1622,13 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Returns a - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * Returns a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The - * {@link google.cloud.security.privateca.v1.CertificateTemplate.name|name} of the - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} - * to get. + * Required. The {@link google.cloud.security.privateca.v1.CertificateTemplate.name|name} of the {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} to + * get. * @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. @@ -1773,34 +1728,29 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Activate a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * that is in state + * Activate a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} that is in state * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} - * and is of type - * {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. - * After the parent Certificate Authority signs a certificate signing request - * from - * {@link google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr|FetchCertificateAuthorityCsr}, - * this method can complete the activation process. + * and is of type {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. After + * the parent Certificate Authority signs a certificate signing request from + * {@link google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr|FetchCertificateAuthorityCsr}, this method can complete the activation + * process. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {string} request.pemCaCertificate * Required. The signed CA certificate issued from * {@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr|FetchCertificateAuthorityCsrResponse.pem_csr}. * @param {google.cloud.security.privateca.v1.SubordinateConfig} request.subordinateConfig - * Required. Must include information about the issuer of - * 'pem_ca_certificate', and any further issuers until the self-signed CA. + * Required. Must include information about the issuer of 'pem_ca_certificate', and any + * further issuers until the self-signed CA. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -1950,29 +1900,24 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Create a new - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in a given Project and Location. + * Create a new {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in a given Project and Location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, - * in the format `projects/* /locations/* /caPools/*`. + * Required. The resource name of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/* /caPools/*`. * @param {string} request.certificateAuthorityId * Required. It must be unique within a location and match the regular * expression `[a-zA-Z0-9_-]{1,63}` * @param {google.cloud.security.privateca.v1.CertificateAuthority} request.certificateAuthority - * Required. A - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * with initial field values. + * Required. A {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} with initial field values. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -2122,20 +2067,18 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Disable a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * Disable a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -2285,20 +2228,18 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Enable a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * Enable a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -2448,21 +2389,18 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Undelete a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * that has been deleted. + * Undelete a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} that has been deleted. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -2612,20 +2550,18 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Delete a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * Delete a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -2778,22 +2714,19 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Update a - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * Update a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.security.privateca.v1.CertificateAuthority} request.certificateAuthority - * Required. - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * with updated values. + * Required. {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} with updated values. * @param {google.protobuf.FieldMask} request.updateMask * Required. A list of fields to be updated in this request. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -2949,19 +2882,17 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool}, in the format - * `projects/* /locations/*`. + * {@link google.cloud.security.privateca.v1.CaPool|CaPool}, in the format `projects/* /locations/*`. * @param {string} request.caPoolId * Required. It must be unique within a location and match the regular * expression `[a-zA-Z0-9_-]{1,63}` * @param {google.cloud.security.privateca.v1.CaPool} request.caPool - * Required. A {@link google.cloud.security.privateca.v1.CaPool|CaPool} with - * initial field values. + * Required. A {@link google.cloud.security.privateca.v1.CaPool|CaPool} with initial field values. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -3112,15 +3043,14 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {google.cloud.security.privateca.v1.CaPool} request.caPool - * Required. {@link google.cloud.security.privateca.v1.CaPool|CaPool} with updated - * values. + * Required. {@link google.cloud.security.privateca.v1.CaPool|CaPool} with updated values. * @param {google.protobuf.FieldMask} request.updateMask * Required. A list of fields to be updated in this request. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -3271,14 +3201,13 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the format - * `projects/* /locations/* /caPools/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the + * format `projects/* /locations/* /caPools/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -3424,22 +3353,19 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Update a - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. + * Update a {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.security.privateca.v1.CertificateRevocationList} request.certificateRevocationList - * Required. - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} - * with updated values. + * Required. {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} with updated values. * @param {google.protobuf.FieldMask} request.updateMask * Required. A list of fields to be updated in this request. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -3590,28 +3516,24 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Create a new - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} - * in a given Project and Location. + * Create a new {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} in a given Project and Location. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}, - * in the format `projects/* /locations/*`. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}, in the format + * `projects/* /locations/*`. * @param {string} request.certificateTemplateId * Required. It must be unique within a location and match the regular * expression `[a-zA-Z0-9_-]{1,63}` * @param {google.cloud.security.privateca.v1.CertificateTemplate} request.certificateTemplate - * Required. A - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} - * with initial field values. + * Required. A {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} with initial field values. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -3761,20 +3683,18 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * DeleteCertificateTemplate deletes a - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * DeleteCertificateTemplate deletes a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The resource name for this - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} - * in the format `projects/* /locations/* /certificateTemplates/*`. + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} in the format + * `projects/* /locations/* /certificateTemplates/*`. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -3924,22 +3844,19 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Update a - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * Update a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.security.privateca.v1.CertificateTemplate} request.certificateTemplate - * Required. - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} - * with updated values. + * Required. {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} with updated values. * @param {google.protobuf.FieldMask} request.updateMask * Required. A list of fields to be updated in this request. * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that - * if you must retry your request, the server will know to ignore the request - * if it has already been completed. The server will guarantee that for at - * least 60 minutes since the first request. + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. * * For example, consider a situation where you make an initial request and t * he request times out. If you make the request again with the same request @@ -4090,27 +4007,25 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the - * format `projects/* /locations/* /caPools/*`. + * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the format + * `projects/* /locations/* /caPools/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include - * in the response. Further - * {@link google.cloud.security.privateca.v1.Certificate|Certificates} can - * subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. * @param {string} [request.filter] - * Optional. Only include resources that match the filter in the response. For - * details on supported filters and syntax, see [Certificates Filtering + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). * @param {string} [request.orderBy] - * Optional. Specify how the results should be sorted. For details on - * supported fields and syntax, see [Certificates Sorting + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4176,27 +4091,25 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the - * format `projects/* /locations/* /caPools/*`. + * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the format + * `projects/* /locations/* /caPools/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include - * in the response. Further - * {@link google.cloud.security.privateca.v1.Certificate|Certificates} can - * subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. * @param {string} [request.filter] - * Optional. Only include resources that match the filter in the response. For - * details on supported filters and syntax, see [Certificates Filtering + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). * @param {string} [request.orderBy] - * Optional. Specify how the results should be sorted. For details on - * supported fields and syntax, see [Certificates Sorting + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4240,27 +4153,25 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the - * format `projects/* /locations/* /caPools/*`. + * {@link google.cloud.security.privateca.v1.Certificate|Certificates}, in the format + * `projects/* /locations/* /caPools/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include - * in the response. Further - * {@link google.cloud.security.privateca.v1.Certificate|Certificates} can - * subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.Certificate|Certificates} to include in the + * response. Further {@link google.cloud.security.privateca.v1.Certificate|Certificates} can subsequently be obtained + * by including the + * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token|ListCertificatesResponse.next_page_token}. * @param {string} [request.filter] - * Optional. Only include resources that match the filter in the response. For - * details on supported filters and syntax, see [Certificates Filtering + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). * @param {string} [request.orderBy] - * Optional. Specify how the results should be sorted. For details on - * supported fields and syntax, see [Certificates Sorting + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4332,25 +4243,21 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Lists - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}. + * Lists {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, - * in the format `projects/* /locations/* /caPools/*`. + * Required. The resource name of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/* /caPools/*`. * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} - * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. @@ -4425,19 +4332,16 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, - * in the format `projects/* /locations/* /caPools/*`. + * Required. The resource name of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/* /caPools/*`. * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} - * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. @@ -4486,19 +4390,16 @@ export class CertificateAuthorityServiceClient { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The resource name of the - * {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, - * in the format `projects/* /locations/* /caPools/*`. + * Required. The resource name of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} associated with the + * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}, in the format + * `projects/* /locations/* /caPools/*`. * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} - * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token|ListCertificateAuthoritiesResponse.next_page_token}. @@ -4585,13 +4486,12 @@ export class CertificateAuthorityServiceClient { * {@link google.cloud.security.privateca.v1.CaPool|CaPools}, in the format * `projects/* /locations/*`. * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CaPool|CaPools} to include in the - * response. Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can - * subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1.CaPool|CaPools} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token}. @@ -4666,13 +4566,12 @@ export class CertificateAuthorityServiceClient { * {@link google.cloud.security.privateca.v1.CaPool|CaPools}, in the format * `projects/* /locations/*`. * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CaPool|CaPools} to include in the - * response. Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can - * subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1.CaPool|CaPools} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token}. @@ -4725,13 +4624,12 @@ export class CertificateAuthorityServiceClient { * {@link google.cloud.security.privateca.v1.CaPool|CaPools}, in the format * `projects/* /locations/*`. * @param {number} [request.pageSize] - * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CaPool|CaPools} to include in the - * response. Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can - * subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * Optional. Limit on the number of {@link google.cloud.security.privateca.v1.CaPool|CaPools} to + * include in the response. + * Further {@link google.cloud.security.privateca.v1.CaPool|CaPools} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token|ListCaPoolsResponse.next_page_token}. @@ -4809,24 +4707,21 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Lists - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}. + * Lists {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, in the format + * `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} to include in the + * response. Further {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. @@ -4902,17 +4797,15 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, in the format + * `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} to include in the + * response. Further {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. @@ -4962,17 +4855,15 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, - * in the format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}, in the format + * `projects/* /locations/* /caPools/* /certificateAuthorities/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} to include in the + * response. Further {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists} * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token|ListCertificateRevocationListsResponse.next_page_token}. @@ -5050,24 +4941,21 @@ export class CertificateAuthorityServiceClient { > ): void; /** - * Lists - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}. + * Lists {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, - * in the format `projects/* /locations/*`. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, in the format + * `projects/* /locations/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} - * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} to include in the response. + * Further {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token}. @@ -5143,17 +5031,15 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, - * in the format `projects/* /locations/*`. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, in the format + * `projects/* /locations/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} - * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} to include in the response. + * Further {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token}. @@ -5203,17 +5089,15 @@ export class CertificateAuthorityServiceClient { * The request object that will be sent. * @param {string} request.parent * Required. The resource name of the location associated with the - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, - * in the format `projects/* /locations/*`. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}, in the format + * `projects/* /locations/*`. * @param {number} [request.pageSize] * Optional. Limit on the number of - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} - * to include in the response. Further - * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} - * can subsequently be obtained by including the - * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} - * in a subsequent request. If unspecified, the server will pick an - * appropriate default. + * {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} to include in the response. + * Further {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates} can subsequently be + * obtained by including the + * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token} in a subsequent + * request. If unspecified, the server will pick an appropriate default. * @param {string} [request.pageToken] * Optional. Pagination token, returned earlier via * {@link google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token|ListCertificateTemplatesResponse.next_page_token}. From 4fc029faef159bcd6b7277569675a7b02a0df919 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 23 Apr 2021 14:19:59 -0700 Subject: [PATCH 035/113] chore: release 2.3.0 (#74) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index fc659dfb371..594c31f3fe1 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.3.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.2.0...v2.3.0) (2021-04-21) + + +### Features + +* Refactored Elliptic Key curves to provide additional options, the NamedCurve enum is replaced by the EcKeyType message. ([#70](https://www.github.com/googleapis/nodejs-security-private-ca/issues/70)) ([567a792](https://www.github.com/googleapis/nodejs-security-private-ca/commit/567a7925e7510b0a1782e894cf7f718d211643ab)) + ## [2.2.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.1.0...v2.2.0) (2021-04-14) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 79fb9d1d2ef..68c28a6b614 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.2.0", + "version": "2.3.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index c2bc745b8b1..04fe243ec5a 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.2.0" + "@google-cloud/security-private-ca": "^2.3.0" }, "devDependencies": { "c8": "^7.1.0", From 4a5c93201390ee03105a74e15b2f4987de31b5e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 5 May 2021 19:24:03 +0000 Subject: [PATCH 036/113] chore: migrate security/privateca to the PHP microgenerator (#78) Committer: @miraleung PiperOrigin-RevId: 370771789 Source-Link: https://github.com/googleapis/googleapis/commit/5af2c82bfec710712f216350709092161115b9f3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61077ef56bce0b9e6343a3a39ffacb47172b49b1 --- .../protos/google/cloud/security/privateca/v1/service.proto | 2 +- packages/google-cloud-security-privateca/protos/protos.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto index 1c1fb75bf88..475e64b5138 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto @@ -32,7 +32,7 @@ option go_package = "google.golang.org/genproto/googleapis/cloud/security/privat option java_multiple_files = true; option java_outer_classname = "PrivateCaProto"; option java_package = "com.google.cloud.security.privateca.v1"; -option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\v1"; +option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1"; option ruby_package = "Google::Cloud::Security::PrivateCA::v1"; // [Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index b6d85ee19e3..75d99efd730 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -16,7 +16,7 @@ "java_multiple_files": true, "java_outer_classname": "PrivateCaProto", "java_package": "com.google.cloud.security.privateca.v1", - "php_namespace": "Google\\Cloud\\Security\\PrivateCA\\v1", + "php_namespace": "Google\\Cloud\\Security\\PrivateCA\\V1", "ruby_package": "Google::Cloud::Security::PrivateCA::v1" }, "nested": { From abd29a048723463596a059a3666a55624dcdbb95 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 6 May 2021 17:52:12 -0700 Subject: [PATCH 037/113] fix(deps): require google-gax v2.12.0 (#80) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 68c28a6b614..87a92f2355b 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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 60ec7e2eeb6391f49bf96bf471514dde3c9f2071 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:02:22 +0000 Subject: [PATCH 038/113] chore: new owl bot post processor docker image (#82) gcr.io/repo-automation-bots/owlbot-nodejs:latest@sha256:f93bb861d6f12574437bb9aee426b71eafd63b419669ff0ed029f4b7e7162e3f --- .../protos/protos.d.ts | 38 +- .../protos/protos.js | 112 +- .../protos/protos.json | 18 +- .../src/index.ts | 3 +- .../certificate_authority_service_client.ts | 395 +-- .../certificate_authority_service_client.ts | 311 +- .../system-test/fixtures/sample/src/index.js | 3 +- .../system-test/fixtures/sample/src/index.ts | 3 +- .../gapic_certificate_authority_service_v1.ts | 2920 +++++++++-------- ...c_certificate_authority_service_v1beta1.ts | 2123 ++++++------ 10 files changed, 3086 insertions(+), 2840 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index 3fa4b5764b7..11d844125f8 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -333,10 +333,10 @@ export namespace google { constructor(properties?: google.cloud.security.privateca.v1.CertificateAuthority.IKeyVersionSpec); /** KeyVersionSpec cloudKmsKeyVersion. */ - public cloudKmsKeyVersion: string; + public cloudKmsKeyVersion?: (string|null); /** KeyVersionSpec algorithm. */ - public algorithm: (google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm); + public algorithm?: (google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|null); /** KeyVersionSpec KeyVersion. */ public KeyVersion?: ("cloudKmsKeyVersion"|"algorithm"); @@ -1496,7 +1496,7 @@ export namespace google { public name: string; /** Certificate pemCsr. */ - public pemCsr: string; + public pemCsr?: (string|null); /** Certificate config. */ public config?: (google.cloud.security.privateca.v1.ICertificateConfig|null); @@ -1975,10 +1975,16 @@ export namespace google { constructor(properties?: google.cloud.security.privateca.v1.X509Parameters.ICaOptions); /** CaOptions isCa. */ - public isCa: boolean; + public isCa?: (boolean|null); /** CaOptions maxIssuerPathLength. */ - public maxIssuerPathLength: number; + public maxIssuerPathLength?: (number|null); + + /** CaOptions _isCa. */ + public _isCa?: "isCa"; + + /** CaOptions _maxIssuerPathLength. */ + public _maxIssuerPathLength?: "maxIssuerPathLength"; /** * Creates a new CaOptions instance using the specified properties. @@ -2072,7 +2078,7 @@ export namespace google { constructor(properties?: google.cloud.security.privateca.v1.ISubordinateConfig); /** SubordinateConfig certificateAuthority. */ - public certificateAuthority: string; + public certificateAuthority?: (string|null); /** SubordinateConfig pemIssuerChain. */ public pemIssuerChain?: (google.cloud.security.privateca.v1.SubordinateConfig.ISubordinateConfigChain|null); @@ -9359,10 +9365,10 @@ export namespace google { constructor(properties?: google.cloud.security.privateca.v1beta1.CertificateAuthority.IKeyVersionSpec); /** KeyVersionSpec cloudKmsKeyVersion. */ - public cloudKmsKeyVersion: string; + public cloudKmsKeyVersion?: (string|null); /** KeyVersionSpec algorithm. */ - public algorithm: (google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm); + public algorithm?: (google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|keyof typeof google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|null); /** KeyVersionSpec KeyVersion. */ public KeyVersion?: ("cloudKmsKeyVersion"|"algorithm"); @@ -9775,7 +9781,7 @@ export namespace google { public name: string; /** Certificate pemCsr. */ - public pemCsr: string; + public pemCsr?: (string|null); /** Certificate config. */ public config?: (google.cloud.security.privateca.v1beta1.ICertificateConfig|null); @@ -10330,7 +10336,7 @@ export namespace google { constructor(properties?: google.cloud.security.privateca.v1beta1.IReusableConfigWrapper); /** ReusableConfigWrapper reusableConfig. */ - public reusableConfig: string; + public reusableConfig?: (string|null); /** ReusableConfigWrapper reusableConfigValues. */ public reusableConfigValues?: (google.cloud.security.privateca.v1beta1.IReusableConfigValues|null); @@ -10429,7 +10435,7 @@ export namespace google { constructor(properties?: google.cloud.security.privateca.v1beta1.ISubordinateConfig); /** SubordinateConfig certificateAuthority. */ - public certificateAuthority: string; + public certificateAuthority?: (string|null); /** SubordinateConfig pemIssuerChain. */ public pemIssuerChain?: (google.cloud.security.privateca.v1beta1.SubordinateConfig.ISubordinateConfigChain|null); @@ -15652,19 +15658,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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index 1195bdc6d1f..fe98b5cfa89 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -1054,19 +1054,19 @@ /** * KeyVersionSpec cloudKmsKeyVersion. - * @member {string} cloudKmsKeyVersion + * @member {string|null|undefined} cloudKmsKeyVersion * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @instance */ - KeyVersionSpec.prototype.cloudKmsKeyVersion = ""; + KeyVersionSpec.prototype.cloudKmsKeyVersion = null; /** * KeyVersionSpec algorithm. - * @member {google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm} algorithm + * @member {google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm|null|undefined} algorithm * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec * @instance */ - KeyVersionSpec.prototype.algorithm = 0; + KeyVersionSpec.prototype.algorithm = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -4040,11 +4040,11 @@ /** * Certificate pemCsr. - * @member {string} pemCsr + * @member {string|null|undefined} pemCsr * @memberof google.cloud.security.privateca.v1.Certificate * @instance */ - Certificate.prototype.pemCsr = ""; + Certificate.prototype.pemCsr = null; /** * Certificate config. @@ -5628,19 +5628,44 @@ /** * CaOptions isCa. - * @member {boolean} isCa + * @member {boolean|null|undefined} isCa * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions * @instance */ - CaOptions.prototype.isCa = false; + CaOptions.prototype.isCa = null; /** * CaOptions maxIssuerPathLength. - * @member {number} maxIssuerPathLength + * @member {number|null|undefined} maxIssuerPathLength * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions * @instance */ - CaOptions.prototype.maxIssuerPathLength = 0; + CaOptions.prototype.maxIssuerPathLength = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CaOptions _isCa. + * @member {"isCa"|undefined} _isCa + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @instance + */ + Object.defineProperty(CaOptions.prototype, "_isCa", { + get: $util.oneOfGetter($oneOfFields = ["isCa"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CaOptions _maxIssuerPathLength. + * @member {"maxIssuerPathLength"|undefined} _maxIssuerPathLength + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @instance + */ + Object.defineProperty(CaOptions.prototype, "_maxIssuerPathLength", { + get: $util.oneOfGetter($oneOfFields = ["maxIssuerPathLength"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CaOptions instance using the specified properties. @@ -5745,12 +5770,17 @@ CaOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.isCa != null && message.hasOwnProperty("isCa")) + var properties = {}; + if (message.isCa != null && message.hasOwnProperty("isCa")) { + properties._isCa = 1; if (typeof message.isCa !== "boolean") return "isCa: boolean expected"; - if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) + } + if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) { + properties._maxIssuerPathLength = 1; if (!$util.isInteger(message.maxIssuerPathLength)) return "maxIssuerPathLength: integer expected"; + } return null; }; @@ -5786,14 +5816,16 @@ if (!options) options = {}; var object = {}; - if (options.defaults) { - object.isCa = false; - object.maxIssuerPathLength = 0; - } - if (message.isCa != null && message.hasOwnProperty("isCa")) + if (message.isCa != null && message.hasOwnProperty("isCa")) { object.isCa = message.isCa; - if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) + if (options.oneofs) + object._isCa = "isCa"; + } + if (message.maxIssuerPathLength != null && message.hasOwnProperty("maxIssuerPathLength")) { object.maxIssuerPathLength = message.maxIssuerPathLength; + if (options.oneofs) + object._maxIssuerPathLength = "maxIssuerPathLength"; + } return object; }; @@ -5841,11 +5873,11 @@ /** * SubordinateConfig certificateAuthority. - * @member {string} certificateAuthority + * @member {string|null|undefined} certificateAuthority * @memberof google.cloud.security.privateca.v1.SubordinateConfig * @instance */ - SubordinateConfig.prototype.certificateAuthority = ""; + SubordinateConfig.prototype.certificateAuthority = null; /** * SubordinateConfig pemIssuerChain. @@ -23244,19 +23276,19 @@ /** * KeyVersionSpec cloudKmsKeyVersion. - * @member {string} cloudKmsKeyVersion + * @member {string|null|undefined} cloudKmsKeyVersion * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec * @instance */ - KeyVersionSpec.prototype.cloudKmsKeyVersion = ""; + KeyVersionSpec.prototype.cloudKmsKeyVersion = null; /** * KeyVersionSpec algorithm. - * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm} algorithm + * @member {google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm|null|undefined} algorithm * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec * @instance */ - KeyVersionSpec.prototype.algorithm = 0; + KeyVersionSpec.prototype.algorithm = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -24387,11 +24419,11 @@ /** * Certificate pemCsr. - * @member {string} pemCsr + * @member {string|null|undefined} pemCsr * @memberof google.cloud.security.privateca.v1beta1.Certificate * @instance */ - Certificate.prototype.pemCsr = ""; + Certificate.prototype.pemCsr = null; /** * Certificate config. @@ -26063,11 +26095,11 @@ /** * ReusableConfigWrapper reusableConfig. - * @member {string} reusableConfig + * @member {string|null|undefined} reusableConfig * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper * @instance */ - ReusableConfigWrapper.prototype.reusableConfig = ""; + ReusableConfigWrapper.prototype.reusableConfig = null; /** * ReusableConfigWrapper reusableConfigValues. @@ -26302,11 +26334,11 @@ /** * SubordinateConfig certificateAuthority. - * @member {string} certificateAuthority + * @member {string|null|undefined} certificateAuthority * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig * @instance */ - SubordinateConfig.prototype.certificateAuthority = ""; + SubordinateConfig.prototype.certificateAuthority = null; /** * SubordinateConfig pemIssuerChain. @@ -38585,43 +38617,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-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 75d99efd730..7db7d39ffd8 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -764,19 +764,33 @@ }, "nested": { "CaOptions": { + "oneofs": { + "_isCa": { + "oneof": [ + "isCa" + ] + }, + "_maxIssuerPathLength": { + "oneof": [ + "maxIssuerPathLength" + ] + } + }, "fields": { "isCa": { "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } }, "maxIssuerPathLength": { "type": "int32", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true } } } diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index 41bc2880a11..39a0a4e08b5 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/src/index.ts @@ -21,7 +21,8 @@ import * as v1beta1 from './v1beta1'; const CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; -type CertificateAuthorityServiceClient = v1beta1.CertificateAuthorityServiceClient; +type CertificateAuthorityServiceClient = + v1beta1.CertificateAuthorityServiceClient; export {v1, v1beta1, CertificateAuthorityServiceClient}; export default {v1, v1beta1, CertificateAuthorityServiceClient}; diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 44655cdfa33..b072c7e1faa 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -401,15 +401,16 @@ export class CertificateAuthorityServiceClient { deleteCaPoolResponse.decode.bind(deleteCaPoolResponse), deleteCaPoolMetadata.decode.bind(deleteCaPoolMetadata) ), - updateCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateCertificateRevocationListResponse.decode.bind( - updateCertificateRevocationListResponse + updateCertificateRevocationList: + new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateRevocationListResponse.decode.bind( + updateCertificateRevocationListResponse + ), + updateCertificateRevocationListMetadata.decode.bind( + updateCertificateRevocationListMetadata + ) ), - updateCertificateRevocationListMetadata.decode.bind( - updateCertificateRevocationListMetadata - ) - ), createCertificateTemplate: new this._gaxModule.LongrunningDescriptor( this.operationsClient, createCertificateTemplateResponse.decode.bind( @@ -518,13 +519,14 @@ export class CertificateAuthorityServiceClient { ]; for (const methodName of certificateAuthorityServiceStubMethods) { const callPromise = this.certificateAuthorityServiceStub.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; } @@ -728,11 +730,10 @@ export class CertificateAuthorityServiceClient { 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.createCertificate(request, options, callback); } @@ -826,11 +827,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificate(request, options, callback); } @@ -942,11 +942,10 @@ export class CertificateAuthorityServiceClient { 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.revokeCertificate(request, options, callback); } @@ -1057,11 +1056,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate.name': request.certificate!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate.name': request.certificate!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificate(request, options, callback); } @@ -1162,11 +1160,10 @@ export class CertificateAuthorityServiceClient { 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.fetchCertificateAuthorityCsr( request, @@ -1265,11 +1262,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificateAuthority( request, @@ -1361,11 +1357,10 @@ export class CertificateAuthorityServiceClient { 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.getCaPool(request, options, callback); } @@ -1476,11 +1471,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - ca_pool: request.caPool || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + ca_pool: request.caPool || '', + }); this.initialize(); return this.innerApiCalls.fetchCaCerts(request, options, callback); } @@ -1575,11 +1569,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificateRevocationList( request, @@ -1678,11 +1671,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificateTemplate( request, @@ -1814,11 +1806,10 @@ export class CertificateAuthorityServiceClient { 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.activateCertificateAuthority( request, @@ -1981,11 +1972,10 @@ export class CertificateAuthorityServiceClient { 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.createCertificateAuthority( request, @@ -2142,11 +2132,10 @@ export class CertificateAuthorityServiceClient { 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.disableCertificateAuthority( request, @@ -2303,11 +2292,10 @@ export class CertificateAuthorityServiceClient { 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.enableCertificateAuthority( request, @@ -2464,11 +2452,10 @@ export class CertificateAuthorityServiceClient { 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.undeleteCertificateAuthority( request, @@ -2628,11 +2615,10 @@ export class CertificateAuthorityServiceClient { 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.deleteCertificateAuthority( request, @@ -2790,11 +2776,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate_authority.name': request.certificateAuthority!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate_authority.name': request.certificateAuthority!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificateAuthority( request, @@ -2956,11 +2941,10 @@ export class CertificateAuthorityServiceClient { 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.createCaPool(request, options, callback); } @@ -3114,11 +3098,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'ca_pool.name': request.caPool!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'ca_pool.name': request.caPool!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCaPool(request, options, callback); } @@ -3271,11 +3254,10 @@ export class CertificateAuthorityServiceClient { 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.deleteCaPool(request, options, callback); } @@ -3429,12 +3411,11 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate_revocation_list.name': - request.certificateRevocationList!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate_revocation_list.name': + request.certificateRevocationList!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificateRevocationList( request, @@ -3597,11 +3578,10 @@ export class CertificateAuthorityServiceClient { 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.createCertificateTemplate( request, @@ -3758,11 +3738,10 @@ export class CertificateAuthorityServiceClient { 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.deleteCertificateTemplate( request, @@ -3920,11 +3899,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate_template.name': request.certificateTemplate!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate_template.name': request.certificateTemplate!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificateTemplate( request, @@ -4076,11 +4054,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificates(request, options, callback); } @@ -4131,11 +4108,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificates.createStream( @@ -4197,17 +4173,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -4314,11 +4289,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities( request, @@ -4369,11 +4343,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities.createStream( @@ -4431,17 +4404,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -4548,11 +4520,10 @@ export class CertificateAuthorityServiceClient { 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.listCaPools(request, options, callback); } @@ -4599,11 +4570,10 @@ export class CertificateAuthorityServiceClient { 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.listCaPools.createStream( @@ -4661,17 +4631,16 @@ export class CertificateAuthorityServiceClient { 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.listCaPools.asyncIterate( this.innerApiCalls['listCaPools'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -4778,11 +4747,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists( request, @@ -4833,11 +4801,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists.createStream( @@ -4895,17 +4862,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -5012,11 +4978,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateTemplates( request, @@ -5067,11 +5032,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateTemplates.createStream( @@ -5129,17 +5093,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificateTemplates.asyncIterate( this.innerApiCalls['listCertificateTemplates'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index dbdefa87f92..98d68a2d2a6 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -324,15 +324,16 @@ export class CertificateAuthorityServiceClient { restoreCertificateAuthorityMetadata ) ), - scheduleDeleteCertificateAuthority: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - scheduleDeleteCertificateAuthorityResponse.decode.bind( - scheduleDeleteCertificateAuthorityResponse + scheduleDeleteCertificateAuthority: + new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + scheduleDeleteCertificateAuthorityResponse.decode.bind( + scheduleDeleteCertificateAuthorityResponse + ), + scheduleDeleteCertificateAuthorityMetadata.decode.bind( + scheduleDeleteCertificateAuthorityMetadata + ) ), - scheduleDeleteCertificateAuthorityMetadata.decode.bind( - scheduleDeleteCertificateAuthorityMetadata - ) - ), updateCertificateAuthority: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateCertificateAuthorityResponse.decode.bind( @@ -342,15 +343,16 @@ export class CertificateAuthorityServiceClient { updateCertificateAuthorityMetadata ) ), - updateCertificateRevocationList: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateCertificateRevocationListResponse.decode.bind( - updateCertificateRevocationListResponse + updateCertificateRevocationList: + new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateCertificateRevocationListResponse.decode.bind( + updateCertificateRevocationListResponse + ), + updateCertificateRevocationListMetadata.decode.bind( + updateCertificateRevocationListMetadata + ) ), - updateCertificateRevocationListMetadata.decode.bind( - updateCertificateRevocationListMetadata - ) - ), }; // Put together the default options sent with requests. @@ -423,13 +425,14 @@ export class CertificateAuthorityServiceClient { ]; for (const methodName of certificateAuthorityServiceStubMethods) { const callPromise = this.certificateAuthorityServiceStub.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; } @@ -618,11 +621,10 @@ export class CertificateAuthorityServiceClient { 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.createCertificate(request, options, callback); } @@ -716,11 +718,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificate(request, options, callback); } @@ -831,11 +832,10 @@ export class CertificateAuthorityServiceClient { 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.revokeCertificate(request, options, callback); } @@ -946,11 +946,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate.name': request.certificate!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate.name': request.certificate!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificate(request, options, callback); } @@ -1051,11 +1050,10 @@ export class CertificateAuthorityServiceClient { 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.fetchCertificateAuthorityCsr( request, @@ -1154,11 +1152,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificateAuthority( request, @@ -1257,11 +1254,10 @@ export class CertificateAuthorityServiceClient { 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.getCertificateRevocationList( request, @@ -1359,11 +1355,10 @@ export class CertificateAuthorityServiceClient { 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.getReusableConfig(request, options, callback); } @@ -1491,11 +1486,10 @@ export class CertificateAuthorityServiceClient { 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.activateCertificateAuthority( request, @@ -1658,11 +1652,10 @@ export class CertificateAuthorityServiceClient { 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.createCertificateAuthority( request, @@ -1819,11 +1812,10 @@ export class CertificateAuthorityServiceClient { 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.disableCertificateAuthority( request, @@ -1980,11 +1972,10 @@ export class CertificateAuthorityServiceClient { 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.enableCertificateAuthority( request, @@ -2141,11 +2132,10 @@ export class CertificateAuthorityServiceClient { 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.restoreCertificateAuthority( request, @@ -2302,11 +2292,10 @@ export class CertificateAuthorityServiceClient { 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.scheduleDeleteCertificateAuthority( request, @@ -2464,11 +2453,10 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate_authority.name': request.certificateAuthority!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate_authority.name': request.certificateAuthority!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificateAuthority( request, @@ -2626,12 +2614,11 @@ export class CertificateAuthorityServiceClient { options = options || {}; options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers[ - 'x-goog-request-params' - ] = gax.routingHeader.fromParams({ - 'certificate_revocation_list.name': - request.certificateRevocationList!.name || '', - }); + options.otherArgs.headers['x-goog-request-params'] = + gax.routingHeader.fromParams({ + 'certificate_revocation_list.name': + request.certificateRevocationList!.name || '', + }); this.initialize(); return this.innerApiCalls.updateCertificateRevocationList( request, @@ -2783,11 +2770,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificates(request, options, callback); } @@ -2838,11 +2824,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificates.createStream( @@ -2904,17 +2889,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -3021,11 +3005,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities( request, @@ -3076,11 +3059,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities.createStream( @@ -3138,17 +3120,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -3255,11 +3236,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists( request, @@ -3310,11 +3290,10 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists.createStream( @@ -3372,17 +3351,16 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } @@ -3489,11 +3467,10 @@ export class CertificateAuthorityServiceClient { 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.listReusableConfigs(request, options, callback); } @@ -3540,11 +3517,10 @@ export class CertificateAuthorityServiceClient { 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.listReusableConfigs.createStream( @@ -3602,17 +3578,16 @@ export class CertificateAuthorityServiceClient { 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.listReusableConfigs.asyncIterate( this.innerApiCalls['listReusableConfigs'] as GaxCall, - (request as unknown) as RequestType, + request as unknown as RequestType, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js index 1f657d6e6a4..451a6f76516 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js @@ -20,7 +20,8 @@ const privateca = require('@google-cloud/security-private-ca'); function main() { - const certificateAuthorityServiceClient = new privateca.CertificateAuthorityServiceClient(); + const certificateAuthorityServiceClient = + new privateca.CertificateAuthorityServiceClient(); } main(); diff --git a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts index f943b9e146f..e92b7556f78 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts @@ -27,7 +27,8 @@ function doStuffWithCertificateAuthorityServiceClient( function main() { // check that the client instance can be created - const certificateAuthorityServiceClient = new CertificateAuthorityServiceClient(); + const certificateAuthorityServiceClient = + new CertificateAuthorityServiceClient(); doStuffWithCertificateAuthorityServiceClient( certificateAuthorityServiceClient ); diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 3a16720cec6..54c8e31b82f 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} 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; @@ -169,49 +168,54 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('should create a client with no option', () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient(); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - fallback: true, - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + fallback: true, + } + ); assert(client); }); it('has initialize method and supports deferred initialization', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); assert.strictEqual(client.certificateAuthorityServiceStub, undefined); await client.initialize(); assert(client.certificateAuthorityServiceStub); }); it('has close method', () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.close(); }); it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + 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); @@ -220,12 +224,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.auth.getProjectId = sinon .stub() .callsArgWith(0, null, fakeProjectId); @@ -244,12 +249,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('createCertificate', () => { it('invokes createCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() @@ -277,12 +283,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() @@ -299,9 +306,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); - client.innerApiCalls.createCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createCertificate( request, @@ -327,12 +333,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() @@ -362,12 +369,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('getCertificate', () => { it('invokes getCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() @@ -395,12 +403,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() @@ -417,9 +426,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); - client.innerApiCalls.getCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificate( request, @@ -445,12 +453,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() @@ -480,12 +489,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('revokeCertificate', () => { it('invokes revokeCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() @@ -513,12 +523,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes revokeCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() @@ -535,9 +546,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); - client.innerApiCalls.revokeCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.revokeCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.revokeCertificate( request, @@ -563,12 +573,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes revokeCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() @@ -598,12 +609,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('updateCertificate', () => { it('invokes updateCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() @@ -632,12 +644,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() @@ -655,9 +668,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); - client.innerApiCalls.updateCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificate( request, @@ -683,12 +695,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() @@ -719,12 +732,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('fetchCertificateAuthorityCsr', () => { it('invokes fetchCertificateAuthorityCsr without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() @@ -741,9 +755,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse() ); - client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.fetchCertificateAuthorityCsr = + stubSimpleCall(expectedResponse); const [response] = await client.fetchCertificateAuthorityCsr(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -754,12 +767,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes fetchCertificateAuthorityCsr without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() @@ -776,9 +790,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse() ); - client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.fetchCertificateAuthorityCsr = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.fetchCertificateAuthorityCsr( request, @@ -804,12 +817,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes fetchCertificateAuthorityCsr with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() @@ -842,12 +856,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('getCertificateAuthority', () => { it('invokes getCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() @@ -864,9 +879,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() ); - client.innerApiCalls.getCertificateAuthority = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getCertificateAuthority = + stubSimpleCall(expectedResponse); const [response] = await client.getCertificateAuthority(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -877,12 +891,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() @@ -899,9 +914,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() ); - client.innerApiCalls.getCertificateAuthority = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificateAuthority = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificateAuthority( request, @@ -927,12 +941,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateAuthority with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() @@ -965,12 +980,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('getCaPool', () => { it('invokes getCaPool without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() @@ -998,12 +1014,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCaPool without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() @@ -1020,9 +1037,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() ); - client.innerApiCalls.getCaPool = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCaPool = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCaPool( request, @@ -1048,12 +1064,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCaPool with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() @@ -1080,12 +1097,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('fetchCaCerts', () => { it('invokes fetchCaCerts without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() @@ -1113,12 +1131,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes fetchCaCerts without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() @@ -1135,9 +1154,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsResponse() ); - client.innerApiCalls.fetchCaCerts = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.fetchCaCerts = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.fetchCaCerts( request, @@ -1163,12 +1181,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes fetchCaCerts with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() @@ -1198,12 +1217,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('getCertificateRevocationList', () => { it('invokes getCertificateRevocationList without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() @@ -1220,9 +1240,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ); - client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getCertificateRevocationList = + stubSimpleCall(expectedResponse); const [response] = await client.getCertificateRevocationList(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1233,12 +1252,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateRevocationList without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() @@ -1255,9 +1275,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ); - client.innerApiCalls.getCertificateRevocationList = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificateRevocationList = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificateRevocationList( request, @@ -1283,12 +1302,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateRevocationList with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() @@ -1321,12 +1341,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('getCertificateTemplate', () => { it('invokes getCertificateTemplate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() @@ -1343,9 +1364,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() ); - client.innerApiCalls.getCertificateTemplate = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getCertificateTemplate = + stubSimpleCall(expectedResponse); const [response] = await client.getCertificateTemplate(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1356,12 +1376,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateTemplate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() @@ -1378,9 +1399,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() ); - client.innerApiCalls.getCertificateTemplate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificateTemplate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificateTemplate( request, @@ -1406,12 +1426,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateTemplate with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() @@ -1444,12 +1465,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('activateCertificateAuthority', () => { it('invokes activateCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() @@ -1466,9 +1488,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.activateCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.activateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1480,12 +1501,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes activateCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() @@ -1502,9 +1524,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.activateCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.activateCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.activateCertificateAuthority( request, @@ -1537,12 +1558,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes activateCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() @@ -1573,12 +1595,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes activateCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() @@ -1608,12 +1631,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkActivateCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -1623,21 +1647,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkActivateCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkActivateCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkActivateCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -1655,12 +1681,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('createCertificateAuthority', () => { it('invokes createCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() @@ -1677,9 +1704,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.createCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.createCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1691,12 +1717,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() @@ -1713,9 +1740,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createCertificateAuthority( request, @@ -1748,12 +1774,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() @@ -1784,12 +1811,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() @@ -1819,12 +1847,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkCreateCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -1834,21 +1863,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkCreateCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkCreateCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -1866,12 +1897,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('disableCertificateAuthority', () => { it('invokes disableCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() @@ -1888,9 +1920,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.disableCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.disableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1902,12 +1933,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes disableCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() @@ -1924,9 +1956,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.disableCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.disableCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.disableCertificateAuthority( request, @@ -1959,12 +1990,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes disableCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() @@ -1995,12 +2027,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes disableCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() @@ -2030,12 +2063,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkDisableCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2045,21 +2079,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDisableCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkDisableCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkDisableCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2077,12 +2113,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('enableCertificateAuthority', () => { it('invokes enableCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() @@ -2099,9 +2136,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.enableCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.enableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2113,12 +2149,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes enableCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() @@ -2135,9 +2172,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.enableCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.enableCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.enableCertificateAuthority( request, @@ -2170,12 +2206,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes enableCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() @@ -2206,12 +2243,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes enableCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() @@ -2241,12 +2279,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkEnableCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2256,21 +2295,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkEnableCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkEnableCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkEnableCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2288,12 +2329,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('undeleteCertificateAuthority', () => { it('invokes undeleteCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() @@ -2310,9 +2352,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.undeleteCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.undeleteCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2324,12 +2365,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes undeleteCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() @@ -2346,9 +2388,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.undeleteCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.undeleteCertificateAuthority( request, @@ -2381,12 +2422,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes undeleteCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() @@ -2417,12 +2459,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes undeleteCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() @@ -2452,12 +2495,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUndeleteCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2467,21 +2511,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUndeleteCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkUndeleteCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkUndeleteCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2499,12 +2545,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('deleteCertificateAuthority', () => { it('invokes deleteCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() @@ -2521,9 +2568,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.deleteCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.deleteCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2535,12 +2581,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() @@ -2557,9 +2604,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteCertificateAuthority( request, @@ -2592,12 +2638,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() @@ -2628,12 +2675,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() @@ -2663,12 +2711,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkDeleteCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2678,21 +2727,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkDeleteCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkDeleteCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2710,12 +2761,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('updateCertificateAuthority', () => { it('invokes updateCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() @@ -2733,9 +2785,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.updateCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.updateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2747,12 +2798,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() @@ -2770,9 +2822,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificateAuthority( request, @@ -2805,12 +2856,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() @@ -2842,12 +2894,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() @@ -2878,12 +2931,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2893,21 +2947,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkUpdateCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkUpdateCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2925,12 +2981,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('createCaPool', () => { it('invokes createCaPool without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() @@ -2959,12 +3016,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCaPool without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() @@ -2981,9 +3039,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCaPool = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createCaPool = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createCaPool( request, @@ -3016,12 +3073,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCaPool with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() @@ -3049,12 +3107,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCaPool with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() @@ -3084,12 +3143,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkCreateCaPoolProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -3108,12 +3168,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkCreateCaPoolProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -3128,12 +3189,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('updateCaPool', () => { it('invokes updateCaPool without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() @@ -3163,12 +3225,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCaPool without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() @@ -3186,9 +3249,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCaPool = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCaPool = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCaPool( request, @@ -3221,12 +3283,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCaPool with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() @@ -3255,12 +3318,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCaPool with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() @@ -3291,12 +3355,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCaPoolProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -3315,12 +3380,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCaPoolProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -3335,12 +3401,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('deleteCaPool', () => { it('invokes deleteCaPool without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() @@ -3369,12 +3436,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCaPool without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() @@ -3391,9 +3459,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteCaPool = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteCaPool = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteCaPool( request, @@ -3426,12 +3493,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCaPool with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() @@ -3459,12 +3527,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCaPool with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() @@ -3494,12 +3563,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkDeleteCaPoolProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -3518,12 +3588,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkDeleteCaPoolProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -3538,12 +3609,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('updateCertificateRevocationList', () => { it('invokes updateCertificateRevocationList without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() @@ -3561,9 +3633,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCall(expectedResponse); const [operation] = await client.updateCertificateRevocationList(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -3575,12 +3646,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateRevocationList without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() @@ -3598,9 +3670,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificateRevocationList( request, @@ -3633,12 +3704,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateRevocationList with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() @@ -3654,10 +3726,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( - undefined, - expectedError - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCall(undefined, expectedError); await assert.rejects( client.updateCertificateRevocationList(request), expectedError @@ -3670,12 +3740,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateRevocationList with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() @@ -3691,11 +3762,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( - undefined, - undefined, - expectedError - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCall(undefined, undefined, expectedError); const [operation] = await client.updateCertificateRevocationList(request); await assert.rejects(operation.promise(), expectedError); assert( @@ -3706,12 +3774,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCertificateRevocationListProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -3721,21 +3790,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateCertificateRevocationListProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkUpdateCertificateRevocationListProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkUpdateCertificateRevocationListProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -3753,12 +3824,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('createCertificateTemplate', () => { it('invokes createCertificateTemplate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() @@ -3775,9 +3847,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCertificateTemplate = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.createCertificateTemplate = + stubLongRunningCall(expectedResponse); const [operation] = await client.createCertificateTemplate(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -3789,12 +3860,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateTemplate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() @@ -3811,9 +3883,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCertificateTemplate = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createCertificateTemplate = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createCertificateTemplate( request, @@ -3846,12 +3917,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateTemplate with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() @@ -3882,12 +3954,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateTemplate with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() @@ -3917,12 +3990,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkCreateCertificateTemplateProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -3932,21 +4006,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateCertificateTemplateProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkCreateCertificateTemplateProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkCreateCertificateTemplateProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -3964,12 +4040,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('deleteCertificateTemplate', () => { it('invokes deleteCertificateTemplate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() @@ -3986,9 +4063,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.deleteCertificateTemplate = + stubLongRunningCall(expectedResponse); const [operation] = await client.deleteCertificateTemplate(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -4000,12 +4076,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCertificateTemplate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() @@ -4022,9 +4099,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.deleteCertificateTemplate = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.deleteCertificateTemplate( request, @@ -4057,12 +4133,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCertificateTemplate with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() @@ -4093,12 +4170,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes deleteCertificateTemplate with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() @@ -4128,12 +4206,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkDeleteCertificateTemplateProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -4143,21 +4222,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteCertificateTemplateProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkDeleteCertificateTemplateProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkDeleteCertificateTemplateProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -4175,12 +4256,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('updateCertificateTemplate', () => { it('invokes updateCertificateTemplate without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() @@ -4198,9 +4280,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateTemplate = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.updateCertificateTemplate = + stubLongRunningCall(expectedResponse); const [operation] = await client.updateCertificateTemplate(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -4212,12 +4293,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateTemplate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() @@ -4235,9 +4317,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateTemplate = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificateTemplate = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificateTemplate( request, @@ -4270,12 +4351,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateTemplate with call error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() @@ -4307,12 +4389,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateTemplate with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() @@ -4343,12 +4426,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCertificateTemplateProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -4358,21 +4442,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateCertificateTemplateProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkUpdateCertificateTemplateProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkUpdateCertificateTemplateProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -4390,12 +4476,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('listCertificates', () => { it('invokes listCertificates without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4431,12 +4518,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificates without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4461,9 +4549,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.Certificate() ), ]; - client.innerApiCalls.listCertificates = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificates = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificates( request, @@ -4491,12 +4578,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificates with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4524,12 +4612,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificatesStream without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4547,12 +4636,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.Certificate() ), ]; - client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificates.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.Certificate[] = []; + const responses: protos.google.cloud.security.privateca.v1.Certificate[] = + []; stream.on( 'data', (response: protos.google.cloud.security.privateca.v1.Certificate) => { @@ -4574,21 +4663,21 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(client.innerApiCalls.listCertificates, request) ); assert.strictEqual( - (client.descriptors.page.listCertificates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificatesStream with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4596,13 +4685,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificates.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.Certificate[] = []; + const responses: protos.google.cloud.security.privateca.v1.Certificate[] = + []; stream.on( 'data', (response: protos.google.cloud.security.privateca.v1.Certificate) => { @@ -4623,21 +4711,21 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(client.innerApiCalls.listCertificates, request) ); assert.strictEqual( - (client.descriptors.page.listCertificates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificates without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4655,36 +4743,37 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.Certificate() ), ]; - client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1.ICertificate[] = []; + client.descriptors.page.listCertificates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1.ICertificate[] = + []; const iterable = client.listCertificatesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificates with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() @@ -4692,27 +4781,26 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificatesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1.ICertificate[] = []; + const responses: protos.google.cloud.security.privateca.v1.ICertificate[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -4720,12 +4808,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('listCertificateAuthorities', () => { it('invokes listCertificateAuthorities without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -4750,9 +4839,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateAuthority() ), ]; - client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listCertificateAuthorities = + stubSimpleCall(expectedResponse); const [response] = await client.listCertificateAuthorities(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -4763,12 +4851,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateAuthorities without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -4793,9 +4882,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateAuthority() ), ]; - client.innerApiCalls.listCertificateAuthorities = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificateAuthorities = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificateAuthorities( request, @@ -4823,12 +4911,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateAuthorities with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -4859,12 +4948,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateAuthoritiesStream without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -4882,12 +4972,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateAuthority() ), ]; - client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificateAuthorities.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificateAuthoritiesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CertificateAuthority[] = []; + const responses: protos.google.cloud.security.privateca.v1.CertificateAuthority[] = + []; stream.on( 'data', ( @@ -4906,27 +4996,30 @@ describe('v1.CertificateAuthorityServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificateAuthoritiesStream with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -4934,13 +5027,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateAuthorities.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificateAuthoritiesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CertificateAuthority[] = []; + const responses: protos.google.cloud.security.privateca.v1.CertificateAuthority[] = + []; stream.on( 'data', ( @@ -4958,27 +5050,30 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateAuthorities without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -4996,36 +5091,39 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateAuthority() ), ]; - client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1.ICertificateAuthority[] = []; + client.descriptors.page.listCertificateAuthorities.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1.ICertificateAuthority[] = + []; const iterable = client.listCertificateAuthoritiesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateAuthorities with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() @@ -5033,27 +5131,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateAuthorities.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificateAuthoritiesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1.ICertificateAuthority[] = []; + const responses: protos.google.cloud.security.privateca.v1.ICertificateAuthority[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -5061,12 +5160,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('listCaPools', () => { it('invokes listCaPools without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5102,12 +5202,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCaPools without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5132,9 +5233,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CaPool() ), ]; - client.innerApiCalls.listCaPools = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCaPools = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCaPools( request, @@ -5160,12 +5260,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCaPools with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5193,12 +5294,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCaPoolsStream without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5216,12 +5318,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CaPool() ), ]; - client.descriptors.page.listCaPools.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCaPools.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCaPoolsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CaPool[] = []; + const responses: protos.google.cloud.security.privateca.v1.CaPool[] = + []; stream.on( 'data', (response: protos.google.cloud.security.privateca.v1.CaPool) => { @@ -5251,12 +5353,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCaPoolsStream with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5270,7 +5373,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const stream = client.listCaPoolsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CaPool[] = []; + const responses: protos.google.cloud.security.privateca.v1.CaPool[] = + []; stream.on( 'data', (response: protos.google.cloud.security.privateca.v1.CaPool) => { @@ -5299,12 +5403,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('uses async iteration with listCaPools without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5322,9 +5427,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CaPool() ), ]; - client.descriptors.page.listCaPools.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); + client.descriptors.page.listCaPools.asyncIterate = + stubAsyncIterationCall(expectedResponse); const responses: protos.google.cloud.security.privateca.v1.ICaPool[] = []; const iterable = client.listCaPoolsAsync(request); for await (const resource of iterable) { @@ -5346,12 +5450,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('uses async iteration with listCaPools with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() @@ -5365,7 +5470,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const iterable = client.listCaPoolsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1.ICaPool[] = []; + const responses: protos.google.cloud.security.privateca.v1.ICaPool[] = + []; for await (const resource of iterable) { responses.push(resource!); } @@ -5387,12 +5493,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('listCertificateRevocationLists', () => { it('invokes listCertificateRevocationLists without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5417,9 +5524,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ), ]; - client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listCertificateRevocationLists = + stubSimpleCall(expectedResponse); const [response] = await client.listCertificateRevocationLists(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -5430,12 +5536,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateRevocationLists without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5460,9 +5567,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ), ]; - client.innerApiCalls.listCertificateRevocationLists = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificateRevocationLists = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificateRevocationLists( request, @@ -5490,12 +5596,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateRevocationLists with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5526,12 +5633,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateRevocationListsStream without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5549,12 +5657,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ), ]; - client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificateRevocationLists.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificateRevocationListsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CertificateRevocationList[] = []; + const responses: protos.google.cloud.security.privateca.v1.CertificateRevocationList[] = + []; stream.on( 'data', ( @@ -5573,8 +5681,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listCertificateRevocationLists, @@ -5582,21 +5692,22 @@ describe('v1.CertificateAuthorityServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificateRevocationListsStream with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5604,13 +5715,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateRevocationLists.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificateRevocationListsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CertificateRevocationList[] = []; + const responses: protos.google.cloud.security.privateca.v1.CertificateRevocationList[] = + []; stream.on( 'data', ( @@ -5628,8 +5738,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listCertificateRevocationLists, @@ -5637,21 +5749,22 @@ describe('v1.CertificateAuthorityServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateRevocationLists without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5669,36 +5782,39 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ), ]; - client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] = []; + client.descriptors.page.listCertificateRevocationLists.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] = + []; const iterable = client.listCertificateRevocationListsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateRevocationLists with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() @@ -5706,27 +5822,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateRevocationLists.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificateRevocationListsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] = []; + const responses: protos.google.cloud.security.privateca.v1.ICertificateRevocationList[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -5734,12 +5851,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { describe('listCertificateTemplates', () => { it('invokes listCertificateTemplates without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -5764,9 +5882,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateTemplate() ), ]; - client.innerApiCalls.listCertificateTemplates = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listCertificateTemplates = + stubSimpleCall(expectedResponse); const [response] = await client.listCertificateTemplates(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -5777,12 +5894,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateTemplates without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -5807,9 +5925,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateTemplate() ), ]; - client.innerApiCalls.listCertificateTemplates = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificateTemplates = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificateTemplates( request, @@ -5837,12 +5954,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateTemplates with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -5873,12 +5991,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateTemplatesStream without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -5896,12 +6015,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateTemplate() ), ]; - client.descriptors.page.listCertificateTemplates.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificateTemplates.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificateTemplatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CertificateTemplate[] = []; + const responses: protos.google.cloud.security.privateca.v1.CertificateTemplate[] = + []; stream.on( 'data', ( @@ -5920,27 +6039,30 @@ describe('v1.CertificateAuthorityServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCertificateTemplates - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateTemplates + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listCertificateTemplates, request) ); assert.strictEqual( - (client.descriptors.page.listCertificateTemplates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateTemplates + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificateTemplatesStream with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -5948,13 +6070,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateTemplates.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateTemplates.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificateTemplatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1.CertificateTemplate[] = []; + const responses: protos.google.cloud.security.privateca.v1.CertificateTemplate[] = + []; stream.on( 'data', ( @@ -5972,27 +6093,30 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCertificateTemplates - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateTemplates + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listCertificateTemplates, request) ); assert.strictEqual( - (client.descriptors.page.listCertificateTemplates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateTemplates + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateTemplates without error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -6010,36 +6134,39 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CertificateTemplate() ), ]; - client.descriptors.page.listCertificateTemplates.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1.ICertificateTemplate[] = []; + client.descriptors.page.listCertificateTemplates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1.ICertificateTemplate[] = + []; const iterable = client.listCertificateTemplatesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificateTemplates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateTemplates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateTemplates with error', async () => { - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() @@ -6047,27 +6174,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateTemplates.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateTemplates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificateTemplatesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1.ICertificateTemplate[] = []; + const responses: protos.google.cloud.security.privateca.v1.ICertificateTemplate[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificateTemplates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateTemplates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateTemplates + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -6081,12 +6209,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { location: 'locationValue', ca_pool: 'caPoolValue', }; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.caPoolPathTemplate.render = sinon .stub() @@ -6148,12 +6277,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { ca_pool: 'caPoolValue', certificate: 'certificateValue', }; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificatePathTemplate.render = sinon .stub() @@ -6226,12 +6356,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { ca_pool: 'caPoolValue', certificate_authority: 'certificateAuthorityValue', }; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() @@ -6249,34 +6380,38 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .render as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromCertificateAuthorityName', () => { - const result = client.matchProjectFromCertificateAuthorityName( - fakePath - ); + const result = + client.matchProjectFromCertificateAuthorityName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromCertificateAuthorityName', () => { - const result = client.matchLocationFromCertificateAuthorityName( - fakePath - ); + const result = + client.matchLocationFromCertificateAuthorityName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -6286,21 +6421,26 @@ describe('v1.CertificateAuthorityServiceClient', () => { const result = client.matchCaPoolFromCertificateAuthorityName(fakePath); assert.strictEqual(result, 'caPoolValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateAuthorityFromCertificateAuthorityName', () => { - const result = client.matchCertificateAuthorityFromCertificateAuthorityName( - fakePath - ); + const result = + client.matchCertificateAuthorityFromCertificateAuthorityName( + fakePath + ); assert.strictEqual(result, 'certificateAuthorityValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -6316,12 +6456,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { certificate_authority: 'certificateAuthorityValue', certificate_revocation_list: 'certificateRevocationListValue', }; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificateRevocationListPathTemplate.render = sinon .stub() @@ -6340,73 +6481,84 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .render as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromCertificateRevocationListName', () => { - const result = client.matchProjectFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchProjectFromCertificateRevocationListName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromCertificateRevocationListName', () => { - const result = client.matchLocationFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchLocationFromCertificateRevocationListName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCaPoolFromCertificateRevocationListName', () => { - const result = client.matchCaPoolFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchCaPoolFromCertificateRevocationListName(fakePath); assert.strictEqual(result, 'caPoolValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateAuthorityFromCertificateRevocationListName', () => { - const result = client.matchCertificateAuthorityFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchCertificateAuthorityFromCertificateRevocationListName( + fakePath + ); assert.strictEqual(result, 'certificateAuthorityValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateRevocationListFromCertificateRevocationListName', () => { - const result = client.matchCertificateRevocationListFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchCertificateRevocationListFromCertificateRevocationListName( + fakePath + ); assert.strictEqual(result, 'certificateRevocationListValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -6420,12 +6572,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { location: 'locationValue', certificate_template: 'certificateTemplateValue', }; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificateTemplatePathTemplate.render = sinon .stub() @@ -6442,8 +6595,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.certificateTemplatePathTemplate - .render as SinonStub) + ( + client.pathTemplates.certificateTemplatePathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); @@ -6453,34 +6608,38 @@ describe('v1.CertificateAuthorityServiceClient', () => { const result = client.matchProjectFromCertificateTemplateName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.certificateTemplatePathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateTemplatePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromCertificateTemplateName', () => { - const result = client.matchLocationFromCertificateTemplateName( - fakePath - ); + const result = + client.matchLocationFromCertificateTemplateName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.certificateTemplatePathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateTemplatePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateTemplateFromCertificateTemplateName', () => { - const result = client.matchCertificateTemplateFromCertificateTemplateName( - fakePath - ); + const result = + client.matchCertificateTemplateFromCertificateTemplateName(fakePath); assert.strictEqual(result, 'certificateTemplateValue'); assert( - (client.pathTemplates.certificateTemplatePathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateTemplatePathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -6493,12 +6652,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { project: 'projectValue', location: 'locationValue', }; - const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index e7722f82639..7c8d0a41aa2 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -28,10 +28,9 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} 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; @@ -169,49 +168,54 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('should create a client with no option', () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient(); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient(); assert(client); }); it('should create a client with gRPC fallback', () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - fallback: true, - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + fallback: true, + } + ); assert(client); }); it('has initialize method and supports deferred initialization', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); assert.strictEqual(client.certificateAuthorityServiceStub, undefined); await client.initialize(); assert(client.certificateAuthorityServiceStub); }); it('has close method', () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.close(); }); it('has getProjectId method', async () => { const fakeProjectId = 'fake-project-id'; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + 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); @@ -220,12 +224,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { it('has getProjectId method with callback', async () => { const fakeProjectId = 'fake-project-id'; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.auth.getProjectId = sinon .stub() .callsArgWith(0, null, fakeProjectId); @@ -244,12 +249,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('createCertificate', () => { it('invokes createCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() @@ -277,12 +283,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() @@ -299,9 +306,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); - client.innerApiCalls.createCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createCertificate( request, @@ -327,12 +333,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() @@ -362,12 +369,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('getCertificate', () => { it('invokes getCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() @@ -395,12 +403,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() @@ -417,9 +426,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); - client.innerApiCalls.getCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificate( request, @@ -445,12 +453,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() @@ -480,12 +489,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('revokeCertificate', () => { it('invokes revokeCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() @@ -513,12 +523,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes revokeCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() @@ -535,9 +546,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); - client.innerApiCalls.revokeCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.revokeCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.revokeCertificate( request, @@ -563,12 +573,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes revokeCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() @@ -598,12 +609,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('updateCertificate', () => { it('invokes updateCertificate without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() @@ -632,12 +644,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificate without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() @@ -655,9 +668,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); - client.innerApiCalls.updateCertificate = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificate = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificate( request, @@ -683,12 +695,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificate with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() @@ -719,12 +732,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('fetchCertificateAuthorityCsr', () => { it('invokes fetchCertificateAuthorityCsr without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() @@ -741,9 +755,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse() ); - client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.fetchCertificateAuthorityCsr = + stubSimpleCall(expectedResponse); const [response] = await client.fetchCertificateAuthorityCsr(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -754,12 +767,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes fetchCertificateAuthorityCsr without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() @@ -776,9 +790,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse() ); - client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.fetchCertificateAuthorityCsr = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.fetchCertificateAuthorityCsr( request, @@ -804,12 +817,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes fetchCertificateAuthorityCsr with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() @@ -842,12 +856,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('getCertificateAuthority', () => { it('invokes getCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() @@ -864,9 +879,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ); - client.innerApiCalls.getCertificateAuthority = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getCertificateAuthority = + stubSimpleCall(expectedResponse); const [response] = await client.getCertificateAuthority(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -877,12 +891,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() @@ -899,9 +914,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ); - client.innerApiCalls.getCertificateAuthority = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificateAuthority = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificateAuthority( request, @@ -927,12 +941,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateAuthority with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() @@ -965,12 +980,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('getCertificateRevocationList', () => { it('invokes getCertificateRevocationList without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() @@ -987,9 +1003,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ); - client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.getCertificateRevocationList = + stubSimpleCall(expectedResponse); const [response] = await client.getCertificateRevocationList(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -1000,12 +1015,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateRevocationList without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() @@ -1022,9 +1038,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ); - client.innerApiCalls.getCertificateRevocationList = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getCertificateRevocationList = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getCertificateRevocationList( request, @@ -1050,12 +1065,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getCertificateRevocationList with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() @@ -1088,12 +1104,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('getReusableConfig', () => { it('invokes getReusableConfig without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() @@ -1121,12 +1138,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getReusableConfig without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() @@ -1143,9 +1161,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ); - client.innerApiCalls.getReusableConfig = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.getReusableConfig = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.getReusableConfig( request, @@ -1171,12 +1188,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes getReusableConfig with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() @@ -1206,12 +1224,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('activateCertificateAuthority', () => { it('invokes activateCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() @@ -1228,9 +1247,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.activateCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.activateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1242,12 +1260,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes activateCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() @@ -1264,9 +1283,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.activateCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.activateCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.activateCertificateAuthority( request, @@ -1299,12 +1317,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes activateCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() @@ -1335,12 +1354,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes activateCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() @@ -1370,12 +1390,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkActivateCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -1385,22 +1406,24 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkActivateCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkActivateCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkActivateCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); const expectedError = new Error('expected'); client.operationsClient.getOperation = stubSimpleCall( @@ -1417,12 +1440,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('createCertificateAuthority', () => { it('invokes createCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() @@ -1439,9 +1463,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.createCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.createCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1453,12 +1476,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() @@ -1475,9 +1499,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.createCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.createCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.createCertificateAuthority( request, @@ -1510,12 +1533,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() @@ -1546,12 +1570,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes createCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() @@ -1581,12 +1606,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkCreateCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -1596,21 +1622,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkCreateCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkCreateCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -1628,12 +1656,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('disableCertificateAuthority', () => { it('invokes disableCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() @@ -1650,9 +1679,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.disableCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.disableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1664,12 +1692,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes disableCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() @@ -1686,9 +1715,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.disableCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.disableCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.disableCertificateAuthority( request, @@ -1721,12 +1749,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes disableCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() @@ -1757,12 +1786,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes disableCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() @@ -1792,12 +1822,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkDisableCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -1807,21 +1838,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDisableCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkDisableCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkDisableCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -1839,12 +1872,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('enableCertificateAuthority', () => { it('invokes enableCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() @@ -1861,9 +1895,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.enableCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.enableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -1875,12 +1908,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes enableCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() @@ -1897,9 +1931,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.enableCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.enableCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.enableCertificateAuthority( request, @@ -1932,12 +1965,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes enableCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() @@ -1968,12 +2002,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes enableCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() @@ -2003,12 +2038,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkEnableCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2018,21 +2054,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkEnableCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkEnableCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkEnableCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2050,12 +2088,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('restoreCertificateAuthority', () => { it('invokes restoreCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() @@ -2072,9 +2111,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.restoreCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.restoreCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2086,12 +2124,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes restoreCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() @@ -2108,9 +2147,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.restoreCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.restoreCertificateAuthority( request, @@ -2143,12 +2181,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes restoreCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() @@ -2179,12 +2218,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes restoreCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() @@ -2214,12 +2254,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkRestoreCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2229,21 +2270,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkRestoreCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkRestoreCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkRestoreCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2261,12 +2304,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('scheduleDeleteCertificateAuthority', () => { it('invokes scheduleDeleteCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() @@ -2283,9 +2327,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.scheduleDeleteCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.scheduleDeleteCertificateAuthority( request ); @@ -2299,12 +2342,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes scheduleDeleteCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() @@ -2321,9 +2365,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.scheduleDeleteCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.scheduleDeleteCertificateAuthority( request, @@ -2356,12 +2399,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes scheduleDeleteCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() @@ -2376,10 +2420,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall( - undefined, - expectedError - ); + client.innerApiCalls.scheduleDeleteCertificateAuthority = + stubLongRunningCall(undefined, expectedError); await assert.rejects( client.scheduleDeleteCertificateAuthority(request), expectedError @@ -2392,12 +2434,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes scheduleDeleteCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() @@ -2412,11 +2455,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall( - undefined, - undefined, - expectedError - ); + client.innerApiCalls.scheduleDeleteCertificateAuthority = + stubLongRunningCall(undefined, undefined, expectedError); const [operation] = await client.scheduleDeleteCertificateAuthority( request ); @@ -2429,12 +2469,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkScheduleDeleteCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2444,21 +2485,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkScheduleDeleteCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkScheduleDeleteCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkScheduleDeleteCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2476,12 +2519,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('updateCertificateAuthority', () => { it('invokes updateCertificateAuthority without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() @@ -2499,9 +2543,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.updateCertificateAuthority = + stubLongRunningCall(expectedResponse); const [operation] = await client.updateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2513,12 +2556,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateAuthority without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() @@ -2536,9 +2580,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateAuthority = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificateAuthority = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificateAuthority( request, @@ -2571,12 +2614,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateAuthority with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() @@ -2608,12 +2652,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateAuthority with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() @@ -2644,12 +2689,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCertificateAuthorityProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2659,21 +2705,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateCertificateAuthorityProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkUpdateCertificateAuthorityProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkUpdateCertificateAuthorityProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2691,12 +2739,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('updateCertificateRevocationList', () => { it('invokes updateCertificateRevocationList without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() @@ -2714,9 +2763,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( - expectedResponse - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCall(expectedResponse); const [operation] = await client.updateCertificateRevocationList(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); @@ -2728,12 +2776,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateRevocationList without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() @@ -2751,9 +2800,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCallWithCallback( - expectedResponse - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.updateCertificateRevocationList( request, @@ -2786,12 +2834,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateRevocationList with call error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() @@ -2807,10 +2856,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( - undefined, - expectedError - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCall(undefined, expectedError); await assert.rejects( client.updateCertificateRevocationList(request), expectedError @@ -2823,12 +2870,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes updateCertificateRevocationList with LRO error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() @@ -2844,11 +2892,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }, }; const expectedError = new Error('expected'); - client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall( - undefined, - undefined, - expectedError - ); + client.innerApiCalls.updateCertificateRevocationList = + stubLongRunningCall(undefined, undefined, expectedError); const [operation] = await client.updateCertificateRevocationList(request); await assert.rejects(operation.promise(), expectedError); assert( @@ -2859,12 +2904,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes checkUpdateCertificateRevocationListProgress without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedResponse = generateSampleMessage( new operationsProtos.google.longrunning.Operation() @@ -2874,21 +2920,23 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateCertificateRevocationListProgress( - expectedResponse.name - ); + const decodedOperation = + await client.checkUpdateCertificateRevocationListProgress( + expectedResponse.name + ); assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); assert(decodedOperation.metadata); assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); it('invokes checkUpdateCertificateRevocationListProgress with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const expectedError = new Error('expected'); @@ -2906,12 +2954,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('listCertificates', () => { it('invokes listCertificates without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -2947,12 +2996,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificates without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -2977,9 +3027,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.Certificate() ), ]; - client.innerApiCalls.listCertificates = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificates = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificates( request, @@ -3007,12 +3056,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificates with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -3040,12 +3090,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificatesStream without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -3063,12 +3114,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.Certificate() ), ]; - client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificates.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.Certificate[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.Certificate[] = + []; stream.on( 'data', ( @@ -3092,21 +3143,21 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(client.innerApiCalls.listCertificates, request) ); assert.strictEqual( - (client.descriptors.page.listCertificates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificatesStream with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -3114,13 +3165,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificates.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificates.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificatesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.Certificate[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.Certificate[] = + []; stream.on( 'data', ( @@ -3143,21 +3193,21 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(client.innerApiCalls.listCertificates, request) ); assert.strictEqual( - (client.descriptors.page.listCertificates - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); - it('uses async iteration with listCertificates without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + it('uses async iteration with listCertificates without error', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -3175,36 +3225,37 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.Certificate() ), ]; - client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1beta1.ICertificate[] = []; + client.descriptors.page.listCertificates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificate[] = + []; const iterable = client.listCertificatesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificates with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() @@ -3212,27 +3263,26 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificatesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1beta1.ICertificate[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificate[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificates - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificates.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3240,12 +3290,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('listCertificateAuthorities', () => { it('invokes listCertificateAuthorities without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3270,9 +3321,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ), ]; - client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listCertificateAuthorities = + stubSimpleCall(expectedResponse); const [response] = await client.listCertificateAuthorities(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -3283,12 +3333,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateAuthorities without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3313,9 +3364,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ), ]; - client.innerApiCalls.listCertificateAuthorities = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificateAuthorities = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificateAuthorities( request, @@ -3343,12 +3393,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateAuthorities with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3379,12 +3430,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateAuthoritiesStream without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3402,12 +3454,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ), ]; - client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificateAuthorities.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificateAuthoritiesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority[] = + []; stream.on( 'data', ( @@ -3426,27 +3478,30 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificateAuthoritiesStream with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3454,13 +3509,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateAuthorities.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificateAuthoritiesStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateAuthority[] = + []; stream.on( 'data', ( @@ -3478,27 +3532,30 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ) .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateAuthorities without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3516,36 +3573,39 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ), ]; - client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] = []; + client.descriptors.page.listCertificateAuthorities.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] = + []; const iterable = client.listCertificateAuthoritiesAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateAuthorities with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() @@ -3553,27 +3613,28 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateAuthorities.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificateAuthoritiesAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateAuthorities - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateAuthorities + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3581,12 +3642,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('listCertificateRevocationLists', () => { it('invokes listCertificateRevocationLists without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3611,9 +3673,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ), ]; - client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listCertificateRevocationLists = + stubSimpleCall(expectedResponse); const [response] = await client.listCertificateRevocationLists(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -3624,12 +3685,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateRevocationLists without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3654,9 +3716,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ), ]; - client.innerApiCalls.listCertificateRevocationLists = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listCertificateRevocationLists = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listCertificateRevocationLists( request, @@ -3684,12 +3745,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateRevocationLists with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3720,12 +3782,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listCertificateRevocationListsStream without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3743,12 +3806,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ), ]; - client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listCertificateRevocationLists.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listCertificateRevocationListsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList[] = + []; stream.on( 'data', ( @@ -3767,8 +3830,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); assert( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listCertificateRevocationLists, @@ -3776,21 +3841,22 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listCertificateRevocationListsStream with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3798,13 +3864,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateRevocationLists.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listCertificateRevocationListsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList[] = + []; stream.on( 'data', ( @@ -3822,8 +3887,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); await assert.rejects(promise, expectedError); assert( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub) + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ) .getCall(0) .calledWith( client.innerApiCalls.listCertificateRevocationLists, @@ -3831,21 +3898,22 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ) ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateRevocationLists without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3863,36 +3931,39 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ), ]; - client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] = []; + client.descriptors.page.listCertificateRevocationLists.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] = + []; const iterable = client.listCertificateRevocationListsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listCertificateRevocationLists with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() @@ -3900,27 +3971,28 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listCertificateRevocationLists.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listCertificateRevocationListsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listCertificateRevocationLists - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listCertificateRevocationLists + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -3928,12 +4000,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { describe('listReusableConfigs', () => { it('invokes listReusableConfigs without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -3958,9 +4031,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ), ]; - client.innerApiCalls.listReusableConfigs = stubSimpleCall( - expectedResponse - ); + client.innerApiCalls.listReusableConfigs = + stubSimpleCall(expectedResponse); const [response] = await client.listReusableConfigs(request); assert.deepStrictEqual(response, expectedResponse); assert( @@ -3971,12 +4043,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listReusableConfigs without error using callback', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -4001,9 +4074,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ), ]; - client.innerApiCalls.listReusableConfigs = stubSimpleCallWithCallback( - expectedResponse - ); + client.innerApiCalls.listReusableConfigs = + stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { client.listReusableConfigs( request, @@ -4031,12 +4103,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listReusableConfigs with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -4064,12 +4137,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('invokes listReusableConfigsStream without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -4087,12 +4161,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ), ]; - client.descriptors.page.listReusableConfigs.createStream = stubPageStreamingCall( - expectedResponse - ); + client.descriptors.page.listReusableConfigs.createStream = + stubPageStreamingCall(expectedResponse); const stream = client.listReusableConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.ReusableConfig[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.ReusableConfig[] = + []; stream.on( 'data', ( @@ -4116,21 +4190,21 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(client.innerApiCalls.listReusableConfigs, request) ); assert.strictEqual( - (client.descriptors.page.listReusableConfigs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listReusableConfigs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('invokes listReusableConfigsStream with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -4138,13 +4212,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listReusableConfigs.createStream = stubPageStreamingCall( - undefined, - expectedError - ); + client.descriptors.page.listReusableConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); const stream = client.listReusableConfigsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.security.privateca.v1beta1.ReusableConfig[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.ReusableConfig[] = + []; stream.on( 'data', ( @@ -4167,21 +4240,21 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(client.innerApiCalls.listReusableConfigs, request) ); assert.strictEqual( - (client.descriptors.page.listReusableConfigs - .createStream as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listReusableConfigs.createStream as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listReusableConfigs without error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -4199,36 +4272,37 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ), ]; - client.descriptors.page.listReusableConfigs.asyncIterate = stubAsyncIterationCall( - expectedResponse - ); - const responses: protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] = []; + client.descriptors.page.listReusableConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] = + []; const iterable = client.listReusableConfigsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listReusableConfigs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listReusableConfigs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); it('uses async iteration with listReusableConfigs with error', async () => { - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() @@ -4236,27 +4310,26 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request.parent = ''; const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('expected'); - client.descriptors.page.listReusableConfigs.asyncIterate = stubAsyncIterationCall( - undefined, - expectedError - ); + client.descriptors.page.listReusableConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); const iterable = client.listReusableConfigsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] = []; + const responses: protos.google.cloud.security.privateca.v1beta1.IReusableConfig[] = + []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listReusableConfigs - .asyncIterate as SinonStub).getCall(0).args[1], + ( + client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], request ); assert.strictEqual( - (client.descriptors.page.listReusableConfigs - .asyncIterate as SinonStub).getCall(0).args[2].otherArgs.headers[ - 'x-goog-request-params' - ], + ( + client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], expectedHeaderRequestParams ); }); @@ -4271,12 +4344,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { certificate_authority: 'certificateAuthorityValue', certificate: 'certificateValue', }; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificatePathTemplate.render = sinon .stub() @@ -4321,9 +4395,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('matchCertificateAuthorityFromCertificateName', () => { - const result = client.matchCertificateAuthorityFromCertificateName( - fakePath - ); + const result = + client.matchCertificateAuthorityFromCertificateName(fakePath); assert.strictEqual(result, 'certificateAuthorityValue'); assert( (client.pathTemplates.certificatePathTemplate.match as SinonStub) @@ -4350,12 +4423,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { location: 'locationValue', certificate_authority: 'certificateAuthorityValue', }; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificateAuthorityPathTemplate.render = sinon .stub() @@ -4372,47 +4446,54 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .render as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromCertificateAuthorityName', () => { - const result = client.matchProjectFromCertificateAuthorityName( - fakePath - ); + const result = + client.matchProjectFromCertificateAuthorityName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromCertificateAuthorityName', () => { - const result = client.matchLocationFromCertificateAuthorityName( - fakePath - ); + const result = + client.matchLocationFromCertificateAuthorityName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateAuthorityFromCertificateAuthorityName', () => { - const result = client.matchCertificateAuthorityFromCertificateAuthorityName( - fakePath - ); + const result = + client.matchCertificateAuthorityFromCertificateAuthorityName( + fakePath + ); assert.strictEqual(result, 'certificateAuthorityValue'); assert( - (client.pathTemplates.certificateAuthorityPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateAuthorityPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4427,12 +4508,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { certificate_authority: 'certificateAuthorityValue', certificate_revocation_list: 'certificateRevocationListValue', }; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.certificateRevocationListPathTemplate.render = sinon .stub() @@ -4450,60 +4532,70 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); assert.strictEqual(result, fakePath); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .render as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .render as SinonStub + ) .getCall(-1) .calledWith(expectedParameters) ); }); it('matchProjectFromCertificateRevocationListName', () => { - const result = client.matchProjectFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchProjectFromCertificateRevocationListName(fakePath); assert.strictEqual(result, 'projectValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchLocationFromCertificateRevocationListName', () => { - const result = client.matchLocationFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchLocationFromCertificateRevocationListName(fakePath); assert.strictEqual(result, 'locationValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateAuthorityFromCertificateRevocationListName', () => { - const result = client.matchCertificateAuthorityFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchCertificateAuthorityFromCertificateRevocationListName( + fakePath + ); assert.strictEqual(result, 'certificateAuthorityValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); }); it('matchCertificateRevocationListFromCertificateRevocationListName', () => { - const result = client.matchCertificateRevocationListFromCertificateRevocationListName( - fakePath - ); + const result = + client.matchCertificateRevocationListFromCertificateRevocationListName( + fakePath + ); assert.strictEqual(result, 'certificateRevocationListValue'); assert( - (client.pathTemplates.certificateRevocationListPathTemplate - .match as SinonStub) + ( + client.pathTemplates.certificateRevocationListPathTemplate + .match as SinonStub + ) .getCall(-1) .calledWith(fakePath) ); @@ -4516,12 +4608,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { project: 'projectValue', location: 'locationValue', }; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.locationPathTemplate.render = sinon .stub() @@ -4568,12 +4661,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { location: 'locationValue', reusable_config: 'reusableConfigValue', }; - const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); client.initialize(); client.pathTemplates.reusableConfigPathTemplate.render = sinon .stub() @@ -4617,9 +4711,8 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); it('matchReusableConfigFromReusableConfigName', () => { - const result = client.matchReusableConfigFromReusableConfigName( - fakePath - ); + const result = + client.matchReusableConfigFromReusableConfigName(fakePath); assert.strictEqual(result, 'reusableConfigValue'); assert( (client.pathTemplates.reusableConfigPathTemplate.match as SinonStub) From 679ce0db08ac201351e9b5daca80cc5ecb2d10c7 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:56:07 +0000 Subject: [PATCH 039/113] fix: use require() to load JSON protos (#84) 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 --- .../security/privateca/v1/resources.proto | 11 ++-- .../protos/protos.d.ts | 10 +++- .../protos/protos.js | 57 +++++++++++++++---- .../protos/protos.json | 18 +++++- .../certificate_authority_service_client.ts | 26 ++------- .../certificate_authority_service_client.ts | 26 ++------- 6 files changed, 83 insertions(+), 65 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto index 4da13f433ce..e3358bc9f3b 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto @@ -995,15 +995,16 @@ message CertificateIdentityConstraints { // https://cloud.google.com/certificate-authority-service/docs/cel-guide google.type.Expr cel_expression = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. If this is set, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate + // Required. If this is true, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate // request into the signed certificate. Otherwise, the requested [Subject][google.cloud.security.privateca.v1.Subject] - // will be discarded. - bool allow_subject_passthrough = 2 [(google.api.field_behavior) = OPTIONAL]; + // will be discarded. The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller. + optional bool allow_subject_passthrough = 2 [(google.api.field_behavior) = REQUIRED]; - // Optional. If this is set, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a + // Required. If this is true, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a // certificate request into the signed certificate. Otherwise, the requested // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be discarded. - bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = OPTIONAL]; + // The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller. + optional bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = REQUIRED]; } // Describes a set of X.509 extensions that may be part of some certificate diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index 11d844125f8..8a4c8775352 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -3818,10 +3818,16 @@ export namespace google { public celExpression?: (google.type.IExpr|null); /** CertificateIdentityConstraints allowSubjectPassthrough. */ - public allowSubjectPassthrough: boolean; + public allowSubjectPassthrough?: (boolean|null); /** CertificateIdentityConstraints allowSubjectAltNamesPassthrough. */ - public allowSubjectAltNamesPassthrough: boolean; + public allowSubjectAltNamesPassthrough?: (boolean|null); + + /** CertificateIdentityConstraints _allowSubjectPassthrough. */ + public _allowSubjectPassthrough?: "allowSubjectPassthrough"; + + /** CertificateIdentityConstraints _allowSubjectAltNamesPassthrough. */ + public _allowSubjectAltNamesPassthrough?: "allowSubjectAltNamesPassthrough"; /** * Creates a new CertificateIdentityConstraints instance using the specified properties. diff --git a/packages/google-cloud-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index fe98b5cfa89..c10e96d1ef1 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -10226,19 +10226,44 @@ /** * CertificateIdentityConstraints allowSubjectPassthrough. - * @member {boolean} allowSubjectPassthrough + * @member {boolean|null|undefined} allowSubjectPassthrough * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints * @instance */ - CertificateIdentityConstraints.prototype.allowSubjectPassthrough = false; + CertificateIdentityConstraints.prototype.allowSubjectPassthrough = null; /** * CertificateIdentityConstraints allowSubjectAltNamesPassthrough. - * @member {boolean} allowSubjectAltNamesPassthrough + * @member {boolean|null|undefined} allowSubjectAltNamesPassthrough * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints * @instance */ - CertificateIdentityConstraints.prototype.allowSubjectAltNamesPassthrough = false; + CertificateIdentityConstraints.prototype.allowSubjectAltNamesPassthrough = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CertificateIdentityConstraints _allowSubjectPassthrough. + * @member {"allowSubjectPassthrough"|undefined} _allowSubjectPassthrough + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @instance + */ + Object.defineProperty(CertificateIdentityConstraints.prototype, "_allowSubjectPassthrough", { + get: $util.oneOfGetter($oneOfFields = ["allowSubjectPassthrough"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * CertificateIdentityConstraints _allowSubjectAltNamesPassthrough. + * @member {"allowSubjectAltNamesPassthrough"|undefined} _allowSubjectAltNamesPassthrough + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @instance + */ + Object.defineProperty(CertificateIdentityConstraints.prototype, "_allowSubjectAltNamesPassthrough", { + get: $util.oneOfGetter($oneOfFields = ["allowSubjectAltNamesPassthrough"]), + set: $util.oneOfSetter($oneOfFields) + }); /** * Creates a new CertificateIdentityConstraints instance using the specified properties. @@ -10348,17 +10373,22 @@ CertificateIdentityConstraints.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.celExpression != null && message.hasOwnProperty("celExpression")) { var error = $root.google.type.Expr.verify(message.celExpression); if (error) return "celExpression." + error; } - if (message.allowSubjectPassthrough != null && message.hasOwnProperty("allowSubjectPassthrough")) + if (message.allowSubjectPassthrough != null && message.hasOwnProperty("allowSubjectPassthrough")) { + properties._allowSubjectPassthrough = 1; if (typeof message.allowSubjectPassthrough !== "boolean") return "allowSubjectPassthrough: boolean expected"; - if (message.allowSubjectAltNamesPassthrough != null && message.hasOwnProperty("allowSubjectAltNamesPassthrough")) + } + if (message.allowSubjectAltNamesPassthrough != null && message.hasOwnProperty("allowSubjectAltNamesPassthrough")) { + properties._allowSubjectAltNamesPassthrough = 1; if (typeof message.allowSubjectAltNamesPassthrough !== "boolean") return "allowSubjectAltNamesPassthrough: boolean expected"; + } return null; }; @@ -10399,17 +10429,20 @@ if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) object.celExpression = null; - object.allowSubjectPassthrough = false; - object.allowSubjectAltNamesPassthrough = false; - } if (message.celExpression != null && message.hasOwnProperty("celExpression")) object.celExpression = $root.google.type.Expr.toObject(message.celExpression, options); - if (message.allowSubjectPassthrough != null && message.hasOwnProperty("allowSubjectPassthrough")) + if (message.allowSubjectPassthrough != null && message.hasOwnProperty("allowSubjectPassthrough")) { object.allowSubjectPassthrough = message.allowSubjectPassthrough; - if (message.allowSubjectAltNamesPassthrough != null && message.hasOwnProperty("allowSubjectAltNamesPassthrough")) + if (options.oneofs) + object._allowSubjectPassthrough = "allowSubjectPassthrough"; + } + if (message.allowSubjectAltNamesPassthrough != null && message.hasOwnProperty("allowSubjectAltNamesPassthrough")) { object.allowSubjectAltNamesPassthrough = message.allowSubjectAltNamesPassthrough; + if (options.oneofs) + object._allowSubjectAltNamesPassthrough = "allowSubjectAltNamesPassthrough"; + } return object; }; diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 7db7d39ffd8..1db6f03eb7b 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -1186,6 +1186,18 @@ } }, "CertificateIdentityConstraints": { + "oneofs": { + "_allowSubjectPassthrough": { + "oneof": [ + "allowSubjectPassthrough" + ] + }, + "_allowSubjectAltNamesPassthrough": { + "oneof": [ + "allowSubjectAltNamesPassthrough" + ] + } + }, "fields": { "celExpression": { "type": "google.type.Expr", @@ -1198,14 +1210,16 @@ "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } }, "allowSubjectAltNamesPassthrough": { "type": "bool", "id": 3, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "proto3_optional": true } } } diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index b072c7e1faa..b3bce2c7234 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -32,6 +32,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/v1/certificate_authority_service_client_config.json`. @@ -149,22 +150,7 @@ export class CertificateAuthorityServiceClient { 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. @@ -221,15 +207,11 @@ export class CertificateAuthorityServiceClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - const protoFilesRoot = opts.fallback - ? this._gaxModule.protobuf.Root.fromJSON( - // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - ) - : this._gaxModule.protobuf.loadSync(nodejsProtoPath); this.operationsClient = this._gaxModule .lro({ diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 98d68a2d2a6..d79fdfd6a09 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -32,6 +32,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/certificate_authority_service_client_config.json`. @@ -149,22 +150,7 @@ export class CertificateAuthorityServiceClient { 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. @@ -213,15 +199,11 @@ export class CertificateAuthorityServiceClient { ), }; + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); + // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - const protoFilesRoot = opts.fallback - ? this._gaxModule.protobuf.Root.fromJSON( - // eslint-disable-next-line @typescript-eslint/no-var-requires - require('../../protos/protos.json') - ) - : this._gaxModule.protobuf.loadSync(nodejsProtoPath); this.operationsClient = this._gaxModule .lro({ From 30c03eef9240072f5ec0d8750c05fe42360d6899 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:13:00 +0000 Subject: [PATCH 040/113] chore: update gapic-generator-typescript to v1.3.2 (#85) 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/v1/certificate_authority_service_client.ts | 1 - .../src/v1beta1/certificate_authority_service_client.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index b3bce2c7234..69204f1b250 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -27,7 +27,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; -import * as path from 'path'; import {Transform} from 'stream'; import {RequestType} from 'google-gax/build/src/apitypes'; diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index d79fdfd6a09..1b2093f07bc 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -27,7 +27,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 f14c8d078cd44919168fa37dc87ce38a9aa0e095 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:27:18 -0700 Subject: [PATCH 041/113] chore: release 2.3.1 (#81) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-security-privateca/CHANGELOG.md | 8 ++++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 594c31f3fe1..1b4915687c8 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [2.3.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.0...v2.3.1) (2021-05-12) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#80](https://www.github.com/googleapis/nodejs-security-private-ca/issues/80)) ([e0b4aa6](https://www.github.com/googleapis/nodejs-security-private-ca/commit/e0b4aa64be0e8433f10cb29ad9f0167a7b292609)) +* use require() to load JSON protos ([#84](https://www.github.com/googleapis/nodejs-security-private-ca/issues/84)) ([3ec9321](https://www.github.com/googleapis/nodejs-security-private-ca/commit/3ec9321734af9de467a082cf34db6c4cf8039d7b)) + ## [2.3.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.2.0...v2.3.0) (2021-04-21) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 87a92f2355b..303df3fc7ec 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.0", + "version": "2.3.1", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 04fe243ec5a..f26f21d4a08 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.0" + "@google-cloud/security-private-ca": "^2.3.1" }, "devDependencies": { "c8": "^7.1.0", From d9565ef5d0a71f561e6e88e203ba176cee9b2f0b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 25 May 2021 17:56:14 +0200 Subject: [PATCH 042/113] chore(deps): update dependency sinon to v11 (#89) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 303df3fc7ec..302f54727c0 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -54,7 +54,7 @@ "mocha": "^8.1.2", "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", "webpack": "^5.0.0", From fcfdba3e37f013a9056bdb5e476498da7c197931 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 20:48:26 +0000 Subject: [PATCH 043/113] fix: GoogleAdsError missing using generator version after 1.3.0 (#90) [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/v1/certificate_authority_service_client.ts | 2 ++ .../src/v1beta1/certificate_authority_service_client.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 69204f1b250..6a9b5c02962 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -144,6 +144,8 @@ export class CertificateAuthorityServiceClient { } 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}`); diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 1b2093f07bc..e92de77bfe1 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -144,6 +144,8 @@ export class CertificateAuthorityServiceClient { } 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 363504fe21ea5619877d7ce09e6aeadad83d28d8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 27 May 2021 11:45:09 -0400 Subject: [PATCH 044/113] chore: release 2.3.2 (#91) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 1b4915687c8..9f84a2a2860 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.2](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.1...v2.3.2) (2021-05-25) + + +### Bug Fixes + +* GoogleAdsError missing using generator version after 1.3.0 ([#90](https://www.github.com/googleapis/nodejs-security-private-ca/issues/90)) ([0a5e25f](https://www.github.com/googleapis/nodejs-security-private-ca/commit/0a5e25f5d351f2bd471512a16f08c2ddc06f2721)) + ### [2.3.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.0...v2.3.1) (2021-05-12) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 302f54727c0..d5b3f637d55 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.1", + "version": "2.3.2", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index f26f21d4a08..44de7758aee 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.1" + "@google-cloud/security-private-ca": "^2.3.2" }, "devDependencies": { "c8": "^7.1.0", From faf99348ca6c682a88fe322d43a38536b8467c58 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 16 Jun 2021 13:53:53 -0700 Subject: [PATCH 045/113] chore: update proto namespaces (#97) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Fixed casing of the Ruby namespace PiperOrigin-RevId: 379779471 Source-Link: https://github.com/googleapis/googleapis/commit/f176fe69e40da773e9ad32d92a680459b0413459 Source-Link: https://github.com/googleapis/googleapis-gen/commit/49ebc3ebe84665d045f53955970362892ab0cb93 * 🦉 Updates from OwlBot Co-authored-by: Owl Bot --- .../protos/google/cloud/security/privateca/v1/service.proto | 2 +- packages/google-cloud-security-privateca/protos/protos.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto index 475e64b5138..4cc2aaebbb1 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto @@ -33,7 +33,7 @@ option java_multiple_files = true; option java_outer_classname = "PrivateCaProto"; option java_package = "com.google.cloud.security.privateca.v1"; option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1"; -option ruby_package = "Google::Cloud::Security::PrivateCA::v1"; +option ruby_package = "Google::Cloud::Security::PrivateCA::V1"; // [Certificate Authority Service][google.cloud.security.privateca.v1.CertificateAuthorityService] manages private // certificate authorities and issued certificates. diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 1db6f03eb7b..4a618bf1b81 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -17,7 +17,7 @@ "java_outer_classname": "PrivateCaProto", "java_package": "com.google.cloud.security.privateca.v1", "php_namespace": "Google\\Cloud\\Security\\PrivateCA\\V1", - "ruby_package": "Google::Cloud::Security::PrivateCA::v1" + "ruby_package": "Google::Cloud::Security::PrivateCA::V1" }, "nested": { "CertificateAuthority": { From bee885aac7f90221bc6f91a384ae671e2b78071a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 23 Jun 2021 07:29:44 -0700 Subject: [PATCH 046/113] fix: make request optional in all cases (#98) Committer: @miraleung PiperOrigin-RevId: 380641501 --- .../certificate_authority_service_client.ts | 116 +++++++++--------- .../certificate_authority_service_client.ts | 80 ++++++------ 2 files changed, 98 insertions(+), 98 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 6a9b5c02962..a704db98ac4 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -585,7 +585,7 @@ export class CertificateAuthorityServiceClient { // -- Service calls -- // ------------------- createCertificate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, options?: CallOptions ): Promise< [ @@ -675,7 +675,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.createCertificate(request); */ createCertificate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -721,7 +721,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.createCertificate(request, options, callback); } getCertificate( - request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, options?: CallOptions ): Promise< [ @@ -772,7 +772,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificate(request); */ getCertificate( - request: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -818,7 +818,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.getCertificate(request, options, callback); } revokeCertificate( - request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, options?: CallOptions ): Promise< [ @@ -887,7 +887,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.revokeCertificate(request); */ revokeCertificate( - request: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -933,7 +933,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.revokeCertificate(request, options, callback); } updateCertificate( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, options?: CallOptions ): Promise< [ @@ -1001,7 +1001,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.updateCertificate(request); */ updateCertificate( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1047,7 +1047,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.updateCertificate(request, options, callback); } fetchCertificateAuthorityCsr( - request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, + request?: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, options?: CallOptions ): Promise< [ @@ -1105,7 +1105,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.fetchCertificateAuthorityCsr(request); */ fetchCertificateAuthorityCsr( - request: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, + request?: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1155,7 +1155,7 @@ export class CertificateAuthorityServiceClient { ); } getCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1207,7 +1207,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificateAuthority(request); */ getCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1257,7 +1257,7 @@ export class CertificateAuthorityServiceClient { ); } getCaPool( - request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, options?: CallOptions ): Promise< [ @@ -1305,7 +1305,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCaPool(request); */ getCaPool( - request: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1348,7 +1348,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.getCaPool(request, options, callback); } fetchCaCerts( - request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, + request?: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, options?: CallOptions ): Promise< [ @@ -1416,7 +1416,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.fetchCaCerts(request); */ fetchCaCerts( - request: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, + request?: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1462,7 +1462,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.fetchCaCerts(request, options, callback); } getCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, options?: CallOptions ): Promise< [ @@ -1514,7 +1514,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificateRevocationList(request); */ getCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1564,7 +1564,7 @@ export class CertificateAuthorityServiceClient { ); } getCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, options?: CallOptions ): Promise< [ @@ -1616,7 +1616,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificateTemplate(request); */ getCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1667,7 +1667,7 @@ export class CertificateAuthorityServiceClient { } activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1749,7 +1749,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1838,7 +1838,7 @@ export class CertificateAuthorityServiceClient { >; } createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1915,7 +1915,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2004,7 +2004,7 @@ export class CertificateAuthorityServiceClient { >; } disableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2075,7 +2075,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ disableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2164,7 +2164,7 @@ export class CertificateAuthorityServiceClient { >; } enableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2235,7 +2235,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ enableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2324,7 +2324,7 @@ export class CertificateAuthorityServiceClient { >; } undeleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2395,7 +2395,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ undeleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2484,7 +2484,7 @@ export class CertificateAuthorityServiceClient { >; } deleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2558,7 +2558,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ deleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2647,7 +2647,7 @@ export class CertificateAuthorityServiceClient { >; } updateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2719,7 +2719,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ updateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2808,7 +2808,7 @@ export class CertificateAuthorityServiceClient { >; } createCaPool( - request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, options?: CallOptions ): Promise< [ @@ -2884,7 +2884,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ createCaPool( - request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2969,7 +2969,7 @@ export class CertificateAuthorityServiceClient { >; } updateCaPool( - request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, options?: CallOptions ): Promise< [ @@ -3041,7 +3041,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ updateCaPool( - request: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -3126,7 +3126,7 @@ export class CertificateAuthorityServiceClient { >; } deleteCaPool( - request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, options?: CallOptions ): Promise< [ @@ -3197,7 +3197,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ deleteCaPool( - request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, + request?: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, optionsOrCallback?: | CallOptions | Callback< @@ -3282,7 +3282,7 @@ export class CertificateAuthorityServiceClient { >; } updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, options?: CallOptions ): Promise< [ @@ -3354,7 +3354,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, optionsOrCallback?: | CallOptions | Callback< @@ -3444,7 +3444,7 @@ export class CertificateAuthorityServiceClient { >; } createCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, options?: CallOptions ): Promise< [ @@ -3521,7 +3521,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ createCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -3610,7 +3610,7 @@ export class CertificateAuthorityServiceClient { >; } deleteCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, options?: CallOptions ): Promise< [ @@ -3681,7 +3681,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ deleteCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -3770,7 +3770,7 @@ export class CertificateAuthorityServiceClient { >; } updateCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, options?: CallOptions ): Promise< [ @@ -3842,7 +3842,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ updateCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, + request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -3931,7 +3931,7 @@ export class CertificateAuthorityServiceClient { >; } listCertificates( - request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, options?: CallOptions ): Promise< [ @@ -4002,7 +4002,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificates( - request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -4170,7 +4170,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, options?: CallOptions ): Promise< [ @@ -4237,7 +4237,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -4401,7 +4401,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listCaPools( - request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, options?: CallOptions ): Promise< [ @@ -4468,7 +4468,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCaPools( - request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -4628,7 +4628,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, options?: CallOptions ): Promise< [ @@ -4695,7 +4695,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -4859,7 +4859,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listCertificateTemplates( - request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, options?: CallOptions ): Promise< [ @@ -4926,7 +4926,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificateTemplates( - request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index e92de77bfe1..3900d2e8b90 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -491,7 +491,7 @@ export class CertificateAuthorityServiceClient { // -- Service calls -- // ------------------- createCertificate( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, options?: CallOptions ): Promise< [ @@ -566,7 +566,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.createCertificate(request); */ createCertificate( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -612,7 +612,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.createCertificate(request, options, callback); } getCertificate( - request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, options?: CallOptions ): Promise< [ @@ -663,7 +663,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificate(request); */ getCertificate( - request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -709,7 +709,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.getCertificate(request, options, callback); } revokeCertificate( - request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, options?: CallOptions ): Promise< [ @@ -777,7 +777,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.revokeCertificate(request); */ revokeCertificate( - request: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -823,7 +823,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.revokeCertificate(request, options, callback); } updateCertificate( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, options?: CallOptions ): Promise< [ @@ -891,7 +891,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.updateCertificate(request); */ updateCertificate( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, optionsOrCallback?: | CallOptions | Callback< @@ -937,7 +937,7 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.updateCertificate(request, options, callback); } fetchCertificateAuthorityCsr( - request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, options?: CallOptions ): Promise< [ @@ -995,7 +995,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.fetchCertificateAuthorityCsr(request); */ fetchCertificateAuthorityCsr( - request: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1045,7 +1045,7 @@ export class CertificateAuthorityServiceClient { ); } getCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1097,7 +1097,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificateAuthority(request); */ getCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1147,7 +1147,7 @@ export class CertificateAuthorityServiceClient { ); } getCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, options?: CallOptions ): Promise< [ @@ -1199,7 +1199,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getCertificateRevocationList(request); */ getCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1249,7 +1249,7 @@ export class CertificateAuthorityServiceClient { ); } getReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, options?: CallOptions ): Promise< [ @@ -1300,7 +1300,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await client.getReusableConfig(request); */ getReusableConfig( - request: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1347,7 +1347,7 @@ export class CertificateAuthorityServiceClient { } activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1429,7 +1429,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1518,7 +1518,7 @@ export class CertificateAuthorityServiceClient { >; } createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1595,7 +1595,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1684,7 +1684,7 @@ export class CertificateAuthorityServiceClient { >; } disableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1755,7 +1755,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ disableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -1844,7 +1844,7 @@ export class CertificateAuthorityServiceClient { >; } enableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -1915,7 +1915,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ enableCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2004,7 +2004,7 @@ export class CertificateAuthorityServiceClient { >; } restoreCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2075,7 +2075,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ restoreCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2164,7 +2164,7 @@ export class CertificateAuthorityServiceClient { >; } scheduleDeleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2235,7 +2235,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ scheduleDeleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2324,7 +2324,7 @@ export class CertificateAuthorityServiceClient { >; } updateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, options?: CallOptions ): Promise< [ @@ -2396,7 +2396,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ updateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2485,7 +2485,7 @@ export class CertificateAuthorityServiceClient { >; } updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, options?: CallOptions ): Promise< [ @@ -2557,7 +2557,7 @@ export class CertificateAuthorityServiceClient { * const [response] = await operation.promise(); */ updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, optionsOrCallback?: | CallOptions | Callback< @@ -2647,7 +2647,7 @@ export class CertificateAuthorityServiceClient { >; } listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, options?: CallOptions ): Promise< [ @@ -2718,7 +2718,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -2886,7 +2886,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, options?: CallOptions ): Promise< [ @@ -2953,7 +2953,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -3117,7 +3117,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, options?: CallOptions ): Promise< [ @@ -3184,7 +3184,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< @@ -3348,7 +3348,7 @@ export class CertificateAuthorityServiceClient { ) as AsyncIterable; } listReusableConfigs( - request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, options?: CallOptions ): Promise< [ @@ -3415,7 +3415,7 @@ export class CertificateAuthorityServiceClient { * for more details and examples. */ listReusableConfigs( - request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, optionsOrCallback?: | CallOptions | PaginationCallback< From 2abf4c53f30ca02aac08dd1ff1f0f8e0553a5b54 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 16:48:39 +0000 Subject: [PATCH 047/113] chore: release 2.3.3 (#99) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.3](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.2...v2.3.3) (2021-06-25) ### Bug Fixes * make request optional in all cases ([#98](https://www.github.com/googleapis/nodejs-security-private-ca/issues/98)) ([2bf045d](https://www.github.com/googleapis/nodejs-security-private-ca/commit/2bf045d956df8699a95aa8644c188462657d849d)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 9f84a2a2860..cfd61ac1ca4 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.3](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.2...v2.3.3) (2021-06-25) + + +### Bug Fixes + +* make request optional in all cases ([#98](https://www.github.com/googleapis/nodejs-security-private-ca/issues/98)) ([2bf045d](https://www.github.com/googleapis/nodejs-security-private-ca/commit/2bf045d956df8699a95aa8644c188462657d849d)) + ### [2.3.2](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.1...v2.3.2) (2021-05-25) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index d5b3f637d55..6f28e58c882 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.2", + "version": "2.3.3", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 44de7758aee..6e39d5b5337 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.2" + "@google-cloud/security-private-ca": "^2.3.3" }, "devDependencies": { "c8": "^7.1.0", From c608ff22bb918b6d1af250c27e791cfb3d7a2cf2 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 30 Jun 2021 12:16:45 -0400 Subject: [PATCH 048/113] fix(deps): google-gax v2.17.0 with mTLS (#102) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 6f28e58c882..86ce1da2f9a 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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 37a8bf0c56aa2fd604e995068ead8f6b1c21e83c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 30 Jun 2021 16:32:28 +0000 Subject: [PATCH 049/113] chore: release 2.3.4 (#104) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.4](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.3...v2.3.4) (2021-06-30) ### Bug Fixes * **deps:** google-gax v2.17.0 with mTLS ([#102](https://www.github.com/googleapis/nodejs-security-private-ca/issues/102)) ([16e36ee](https://www.github.com/googleapis/nodejs-security-private-ca/commit/16e36ee26015aac15526fb8a1f5f6b0bc4e368b0)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index cfd61ac1ca4..512bea02640 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.4](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.3...v2.3.4) (2021-06-30) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#102](https://www.github.com/googleapis/nodejs-security-private-ca/issues/102)) ([16e36ee](https://www.github.com/googleapis/nodejs-security-private-ca/commit/16e36ee26015aac15526fb8a1f5f6b0bc4e368b0)) + ### [2.3.3](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.2...v2.3.3) (2021-06-25) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 86ce1da2f9a..451ca931215 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.3", + "version": "2.3.4", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 6e39d5b5337..4761313d45d 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.3" + "@google-cloud/security-private-ca": "^2.3.4" }, "devDependencies": { "c8": "^7.1.0", From d34eca5a5f815a8fbdc67f30c1e29f17add47142 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 12 Jul 2021 17:48:36 -0400 Subject: [PATCH 050/113] fix(deps): google-gax v2.17.1 (#105) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 451ca931215..0c1d9c625d3 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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 24ae1828e812c5e3c65b928d34196d389ccc59bd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 12 Jul 2021 22:34:18 +0000 Subject: [PATCH 051/113] chore: release 2.3.5 (#106) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.5](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.4...v2.3.5) (2021-07-12) ### Bug Fixes * **deps:** google-gax v2.17.1 ([#105](https://www.github.com/googleapis/nodejs-security-private-ca/issues/105)) ([860efe6](https://www.github.com/googleapis/nodejs-security-private-ca/commit/860efe6bc751b42e652e4b6ec22364fd30e6b2cd)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 512bea02640..f227851a51c 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.5](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.4...v2.3.5) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#105](https://www.github.com/googleapis/nodejs-security-private-ca/issues/105)) ([860efe6](https://www.github.com/googleapis/nodejs-security-private-ca/commit/860efe6bc751b42e652e4b6ec22364fd30e6b2cd)) + ### [2.3.4](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.3...v2.3.4) (2021-06-30) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 0c1d9c625d3..ff467816cab 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.4", + "version": "2.3.5", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 4761313d45d..337b70b8f7f 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.4" + "@google-cloud/security-private-ca": "^2.3.5" }, "devDependencies": { "c8": "^7.1.0", From eb1c82bf95c65636ceae6dea0bf06029b40ad5fb 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 12:01:26 -0700 Subject: [PATCH 052/113] fix: Updating WORKSPACE files to use the newest version of the Typescript generator. (#108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Updating WORKSPACE files to use the newest version of the Typescript generator. Also removing the explicit generator tag for the IAMPolicy mixin for the kms and pubsub APIS as the generator will now read it from the .yaml file. PiperOrigin-RevId: 385101839 Source-Link: https://github.com/googleapis/googleapis/commit/80f404215a9346259db760d80d0671f28c433453 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d3509d2520fb8db862129633f1cf8406d17454e1 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/master/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../security/privateca/v1/resources.proto | 31 ++++++++++--------- .../cloud/security/privateca/v1/service.proto | 2 +- .../protos/protos.json | 14 ++++----- .../certificate_authority_service_client.ts | 29 +++++++++++------ .../certificate_authority_service_client.ts | 11 ++++++- .../gapic_certificate_authority_service_v1.ts | 4 +-- 6 files changed, 55 insertions(+), 36 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto index e3358bc9f3b..fb73f15b896 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto @@ -251,21 +251,21 @@ message CaPool { // [Certificates][google.cloud.security.privateca.v1.Certificate]. The options set here apply to certificates // issued by any [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the [CaPool][google.cloud.security.privateca.v1.CaPool]. message PublishingOptions { - // Required. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate and + // Optional. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate and // includes its URL in the "Authority Information Access" X.509 extension // in all issued [Certificates][google.cloud.security.privateca.v1.Certificate]. If this is false, the CA // certificate will not be published and the corresponding X.509 extension // will not be written in issued certificates. - bool publish_ca_cert = 1 [(google.api.field_behavior) = REQUIRED]; + bool publish_ca_cert = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRL and includes its + // Optional. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRL and includes its // URL in the "CRL Distribution Points" X.509 extension in all issued // [Certificates][google.cloud.security.privateca.v1.Certificate]. If this is false, CRLs will not be published // and the corresponding X.509 extension will not be written in issued // certificates. // CRLs will expire 7 days from their creation. However, we will rebuild // daily. CRLs are also rebuilt shortly after a certificate is revoked. - bool publish_crl = 2 [(google.api.field_behavior) = REQUIRED]; + bool publish_crl = 2 [(google.api.field_behavior) = OPTIONAL]; } // Defines controls over all certificate issuance within a [CaPool][google.cloud.security.privateca.v1.CaPool]. @@ -330,13 +330,13 @@ message CaPool { // [Certificates][google.cloud.security.privateca.v1.Certificate] may be requested from this // [CaPool][google.cloud.security.privateca.v1.CaPool]. message IssuanceModes { - // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by + // Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by // specifying a CSR. - bool allow_csr_based_issuance = 1 [(google.api.field_behavior) = REQUIRED]; + bool allow_csr_based_issuance = 1 [(google.api.field_behavior) = OPTIONAL]; - // Required. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by + // Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by // specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig]. - bool allow_config_based_issuance = 2 [(google.api.field_behavior) = REQUIRED]; + bool allow_config_based_issuance = 2 [(google.api.field_behavior) = OPTIONAL]; } // Optional. If any [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType] is specified, then the certificate request's @@ -786,13 +786,15 @@ message CertificateDescription { string hex_serial_number = 3; // For convenience, the actual lifetime of an issued certificate. - // Corresponds to 'not_after_time' - 'not_before_time'. google.protobuf.Duration lifetime = 4; // The time at which the certificate becomes valid. google.protobuf.Timestamp not_before_time = 5; - // The time at which the certificate expires. + // The time after which the certificate is expired. + // Per RFC 5280, the validity period for a certificate is the period of time + // from not_before_time through not_after_time, inclusive. + // Corresponds to 'not_before_time' + 'lifetime' - 1 second. google.protobuf.Timestamp not_after_time = 6; } @@ -855,10 +857,10 @@ message X509Extension { // Required. The OID for this X.509 extension. ObjectId object_id = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Indicates whether or not this extension is critical (i.e., if the client + // Optional. Indicates whether or not this extension is critical (i.e., if the client // does not know how to handle this extension, the client should consider this // to be an error). - bool critical = 2 [(google.api.field_behavior) = REQUIRED]; + bool critical = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The value of this X.509 extension. bytes value = 3 [(google.api.field_behavior) = REQUIRED]; @@ -992,18 +994,17 @@ message CertificateIdentityConstraints { // Optional. A CEL expression that may be used to validate the resolved X.509 Subject // and/or Subject Alternative Name before a certificate is signed. // To see the full allowed syntax and some examples, see - // https://cloud.google.com/certificate-authority-service/docs/cel-guide + // https://cloud.google.com/certificate-authority-service/docs/using-cel google.type.Expr cel_expression = 1 [(google.api.field_behavior) = OPTIONAL]; // Required. If this is true, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate // request into the signed certificate. Otherwise, the requested [Subject][google.cloud.security.privateca.v1.Subject] - // will be discarded. The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller. + // will be discarded. optional bool allow_subject_passthrough = 2 [(google.api.field_behavior) = REQUIRED]; // Required. If this is true, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a // certificate request into the signed certificate. Otherwise, the requested // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be discarded. - // The bool is optional to indicate an unset field, which suggests a forgotten value that needs to be set by the caller. optional bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = REQUIRED]; } diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto index 4cc2aaebbb1..f13ce093e2a 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto @@ -260,7 +260,7 @@ service CertificateAuthorityService { }; option (google.api.method_signature) = "name"; option (google.longrunning.operation_info) = { - response_type: "CaPool" + response_type: "google.protobuf.Empty" metadata_type: "OperationMetadata" }; } diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 4a618bf1b81..caa4550d69d 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -265,14 +265,14 @@ "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "publishCrl": { "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } } } @@ -391,14 +391,14 @@ "type": "bool", "id": 1, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "allowConfigBasedIssuance": { "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } } } @@ -1021,7 +1021,7 @@ "type": "bool", "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, "value": { @@ -1724,7 +1724,7 @@ "options": { "(google.api.http).delete": "/v1/{name=projects/*/locations/*/caPools/*}", "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "CaPool", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", "(google.longrunning.operation_info).metadata_type": "OperationMetadata" }, "parsedOptions": [ @@ -1738,7 +1738,7 @@ }, { "(google.longrunning.operation_info)": { - "response_type": "CaPool", + "response_type": "google.protobuf.Empty", "metadata_type": "OperationMetadata" } } diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index a704db98ac4..3590e9f0012 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -50,6 +50,7 @@ const version = require('../../../package.json').version; export class CertificateAuthorityServiceClient { 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: {}; @@ -61,6 +62,7 @@ export class CertificateAuthorityServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; @@ -106,6 +108,9 @@ export class CertificateAuthorityServiceClient { .constructor as typeof CertificateAuthorityServiceClient; 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 = @@ -275,7 +280,7 @@ export class CertificateAuthorityServiceClient { '.google.cloud.security.privateca.v1.OperationMetadata' ) as gax.protobuf.Type; const deleteCaPoolResponse = protoFilesRoot.lookup( - '.google.cloud.security.privateca.v1.CaPool' + '.google.protobuf.Empty' ) as gax.protobuf.Type; const deleteCaPoolMetadata = protoFilesRoot.lookup( '.google.cloud.security.privateca.v1.OperationMetadata' @@ -435,6 +440,9 @@ export class CertificateAuthorityServiceClient { // 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; } /** @@ -464,7 +472,8 @@ export class CertificateAuthorityServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.security.privateca.v1 .CertificateAuthorityService, - this._opts + this._opts, + this._providedCustomServicePath ) as Promise<{[method: string]: Function}>; // Iterate over each of the methods that the service provides @@ -3131,7 +3140,7 @@ export class CertificateAuthorityServiceClient { ): Promise< [ LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -3143,7 +3152,7 @@ export class CertificateAuthorityServiceClient { options: CallOptions, callback: Callback< LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -3154,7 +3163,7 @@ export class CertificateAuthorityServiceClient { request: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, callback: Callback< LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -3202,7 +3211,7 @@ export class CertificateAuthorityServiceClient { | CallOptions | Callback< LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -3210,7 +3219,7 @@ export class CertificateAuthorityServiceClient { >, callback?: Callback< LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >, protos.google.longrunning.IOperation | null | undefined, @@ -3219,7 +3228,7 @@ export class CertificateAuthorityServiceClient { ): Promise< [ LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >, protos.google.longrunning.IOperation | undefined, @@ -3263,7 +3272,7 @@ export class CertificateAuthorityServiceClient { name: string ): Promise< LROperation< - protos.google.cloud.security.privateca.v1.CaPool, + protos.google.protobuf.Empty, protos.google.cloud.security.privateca.v1.OperationMetadata > > { @@ -3277,7 +3286,7 @@ export class CertificateAuthorityServiceClient { gax.createDefaultBackoffSettings() ); return decodeOperation as LROperation< - protos.google.cloud.security.privateca.v1.CaPool, + protos.google.protobuf.Empty, protos.google.cloud.security.privateca.v1.OperationMetadata >; } diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 3900d2e8b90..9301c0ce8d0 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -50,6 +50,7 @@ const version = require('../../../package.json').version; export class CertificateAuthorityServiceClient { 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: {}; @@ -61,6 +62,7 @@ export class CertificateAuthorityServiceClient { longrunning: {}, batching: {}, }; + warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; @@ -106,6 +108,9 @@ export class CertificateAuthorityServiceClient { .constructor as typeof CertificateAuthorityServiceClient; 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 = @@ -350,6 +355,9 @@ export class CertificateAuthorityServiceClient { // 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; } /** @@ -379,7 +387,8 @@ export class CertificateAuthorityServiceClient { : // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._protos as any).google.cloud.security.privateca.v1beta1 .CertificateAuthorityService, - 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-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 54c8e31b82f..7ad216f9cba 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -3467,7 +3467,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ( err?: Error | null, result?: LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata > | null ) => { @@ -3480,7 +3480,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); }); const operation = (await promise) as LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.protobuf.IEmpty, protos.google.cloud.security.privateca.v1.IOperationMetadata >; const [response] = await operation.promise(); From 588e352acb3521338675c7d7eb290fd997a27838 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 16 Jul 2021 12:57:58 -0700 Subject: [PATCH 053/113] chore: release 2.3.6 (#109) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index f227851a51c..ac2e6a071a5 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.6](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.5...v2.3.6) (2021-07-16) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#108](https://www.github.com/googleapis/nodejs-security-private-ca/issues/108)) ([526d6f3](https://www.github.com/googleapis/nodejs-security-private-ca/commit/526d6f33c6354236adb416a5ff256d53319f8d88)) + ### [2.3.5](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.4...v2.3.5) (2021-07-12) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index ff467816cab..6c0dcfd9d87 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.5", + "version": "2.3.6", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 337b70b8f7f..15a63e469df 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.5" + "@google-cloud/security-private-ca": "^2.3.6" }, "devDependencies": { "c8": "^7.1.0", From 4eea00c95b067506e4d31d263bb6c7eaf5c86dd8 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Wed, 4 Aug 2021 16:06:49 -0400 Subject: [PATCH 054/113] chore(nodejs): update client ref docs link in metadata (#114) --- packages/google-cloud-security-privateca/.repo-metadata.json | 2 +- packages/google-cloud-security-privateca/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 4e5ead57991..211ed1d0c7c 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -1,5 +1,5 @@ { - "client_documentation": "https://googleapis.dev/nodejs/security-private-ca/latest/index.html", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/security-private-ca/latest", "api_id": "privateca.googleapis.com", "distribution_name": "@google-cloud/security-private-ca", "release_level": "beta", diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 4df79fb8061..a3613dba96b 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -151,7 +151,7 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-security-private-ca/blob/master/LICENSE) -[client-docs]: https://googleapis.dev/nodejs/security-private-ca/latest/index.html +[client-docs]: https://cloud.google.com/nodejs/docs/reference/security-private-ca/latest [product-docs]: https://cloud.google.com/certificate-authority-service [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project From 19172c1595def099486a2df95b4f9b975f22b4ec Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Mon, 16 Aug 2021 22:46:19 -0400 Subject: [PATCH 055/113] fix(deps): google-gax v2.24.1 (#116) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 6c0dcfd9d87..04948dd0d7f 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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 ceedceb2b0a21d9d292dbb04cf40a59f393b234d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 17 Aug 2021 17:10:41 +0000 Subject: [PATCH 056/113] chore: release 2.3.7 (#117) :robot: I have created a release \*beep\* \*boop\* --- ### [2.3.7](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.6...v2.3.7) (2021-08-17) ### Bug Fixes * **deps:** google-gax v2.24.1 ([#116](https://www.github.com/googleapis/nodejs-security-private-ca/issues/116)) ([f5cb1ea](https://www.github.com/googleapis/nodejs-security-private-ca/commit/f5cb1ea2345996b23f50f747dc0f96302d974235)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index ac2e6a071a5..43032c7aa73 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.3.7](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.6...v2.3.7) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#116](https://www.github.com/googleapis/nodejs-security-private-ca/issues/116)) ([f5cb1ea](https://www.github.com/googleapis/nodejs-security-private-ca/commit/f5cb1ea2345996b23f50f747dc0f96302d974235)) + ### [2.3.6](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.5...v2.3.6) (2021-07-16) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 04948dd0d7f..332cb9145e8 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.6", + "version": "2.3.7", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 15a63e469df..64dff5285f9 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.6" + "@google-cloud/security-private-ca": "^2.3.7" }, "devDependencies": { "c8": "^7.1.0", From 1df5efda8ff9d7546e3c55cadac291f35971b59e 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:28:42 +0000 Subject: [PATCH 057/113] feat: turns on self-signed JWT feature flag (#118) - [ ] 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/certificate_authority_service_client.ts | 7 +++++++ .../src/v1beta1/certificate_authority_service_client.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 3590e9f0012..12b7e996e55 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -135,6 +135,12 @@ export class CertificateAuthorityServiceClient { // 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; @@ -5509,6 +5515,7 @@ export class CertificateAuthorityServiceClient { return this.certificateAuthorityServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 9301c0ce8d0..e48ce19c085 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -135,6 +135,12 @@ export class CertificateAuthorityServiceClient { // 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; @@ -3909,6 +3915,7 @@ export class CertificateAuthorityServiceClient { return this.certificateAuthorityServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.operationsClient.close(); }); } return Promise.resolve(); From 97e37a4abc173f8b95583b2397cf374764773c5c Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:42:14 +0000 Subject: [PATCH 058/113] chore: release 2.4.0 (#119) :robot: I have created a release \*beep\* \*boop\* --- ## [2.4.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.7...v2.4.0) (2021-08-23) ### Features * turns on self-signed JWT feature flag ([#118](https://www.github.com/googleapis/nodejs-security-private-ca/issues/118)) ([8cafa73](https://www.github.com/googleapis/nodejs-security-private-ca/commit/8cafa73b6529a0e90b64977a0d4fe042eb214348)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 43032c7aa73..cceee886c36 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.4.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.7...v2.4.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#118](https://www.github.com/googleapis/nodejs-security-private-ca/issues/118)) ([8cafa73](https://www.github.com/googleapis/nodejs-security-private-ca/commit/8cafa73b6529a0e90b64977a0d4fe042eb214348)) + ### [2.3.7](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.6...v2.3.7) (2021-08-17) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 332cb9145e8..d66fc50b50a 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.3.7", + "version": "2.4.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 64dff5285f9..3fc2c4924ad 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.3.7" + "@google-cloud/security-private-ca": "^2.4.0" }, "devDependencies": { "c8": "^7.1.0", From 621e94a5107a396b1b988353ce7cf603942a5579 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:38:35 +0000 Subject: [PATCH 059/113] chore: disable renovate dependency dashboard (#1194) (#121) --- packages/google-cloud-security-privateca/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index a3613dba96b..1b2b663d3f9 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -142,8 +142,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 3e02d5a5a5cfbd25a225272898ae1f63770a6d26 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 10 Sep 2021 12:42:28 -0400 Subject: [PATCH 060/113] fix(build): set default branch to main (#122) --- packages/google-cloud-security-privateca/README.md | 12 ++++++------ .../samples/README.md | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 1b2b663d3f9..2509f3b462c 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -6,7 +6,7 @@ [![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) +[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) @@ -15,7 +15,7 @@ Privateca client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-security-private-ca/blob/master/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/nodejs-security-private-ca/blob/main/CHANGELOG.md). * [Certificate Authority Service Node.js Client API Reference][client-docs] * [Certificate Authority Service Documentation][product-docs] @@ -85,11 +85,11 @@ listCertificates(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | @@ -137,7 +137,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-security-private-ca/blob/master/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-security-private-ca/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`) @@ -149,7 +149,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-security-private-ca/blob/master/LICENSE) +See [LICENSE](https://github.com/googleapis/nodejs-security-private-ca/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/security-private-ca/latest [product-docs]: https://cloud.google.com/certificate-authority-service diff --git a/packages/google-cloud-security-privateca/samples/README.md b/packages/google-cloud-security-privateca/samples/README.md index ec38ee7fdd0..1dc584cc6e4 100644 --- a/packages/google-cloud-security-privateca/samples/README.md +++ b/packages/google-cloud-security-privateca/samples/README.md @@ -31,7 +31,7 @@ Before running the samples, make sure you've followed the steps outlined in ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-security-private-ca/blob/master/samples/quickstart.js). +View the [source code](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) From 8df40780829272e84c50ef71b992cb32a92b58c6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 10 Sep 2021 10:53:40 -0700 Subject: [PATCH 061/113] chore: release 2.4.1 (#123) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- packages/google-cloud-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index cceee886c36..1f1af9ea07f 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [2.4.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.4.0...v2.4.1) (2021-09-10) + + +### Bug Fixes + +* **build:** set default branch to main ([#122](https://www.github.com/googleapis/nodejs-security-private-ca/issues/122)) ([dbd2a17](https://www.github.com/googleapis/nodejs-security-private-ca/commit/dbd2a1722f5624cbe4d7533e4a537c645cc87659)) + ## [2.4.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.3.7...v2.4.0) (2021-08-23) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index d66fc50b50a..21f7390db95 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.4.0", + "version": "2.4.1", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 3fc2c4924ad..499b2386699 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.4.0" + "@google-cloud/security-private-ca": "^2.4.1" }, "devDependencies": { "c8": "^7.1.0", From 7623c8626775dc86aaa4d2ad81cc300495c1366b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:12:29 +0000 Subject: [PATCH 062/113] build: update package name for security-private-ca (#131) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 401006101 Source-Link: https://github.com/googleapis/googleapis/commit/ac08aa4acd27200c8f46b6d9e703c24ae9901de1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/64cff54d67b6c7c5e21469b64295ccfd5d2ac85d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjRjZmY1NGQ2N2I2YzdjNWUyMTQ2OWI2NDI5NWNjZmQ1ZDJhYzg1ZCJ9 docs(samples): add auto-generated Node samples PiperOrigin-RevId: 398604509 Source-Link: https://github.com/googleapis/googleapis/commit/6ef16b9ecf427f387fa88e9b20b9355e64c863f0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8314e1ead3e906dbf2012ced8d92f2bc8dd45c95 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODMxNGUxZWFkM2U5MDZkYmYyMDEyY2VkOGQ5MmYyYmM4ZGQ0NWM5NSJ9 feat(privateca): add IAMPolicy & Locations mix-in support PiperOrigin-RevId: 400044694 Source-Link: https://github.com/googleapis/googleapis/commit/af7fb72df59a814221b123a4d1acb3f6c3e6cc95 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e714cc5d23217833c0f3785b345bbaab18665df2 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTcxNGNjNWQyMzIxNzgzM2MwZjM3ODViMzQ1YmJhYWIxODY2NWRmMiJ9 --- ..._service.activate_certificate_authority.js | 83 +++ ...ficate_authority_service.create_ca_pool.js | 80 +++ ...te_authority_service.create_certificate.js | 100 ++++ ...ty_service.create_certificate_authority.js | 83 +++ ...ity_service.create_certificate_template.js | 83 +++ ...ficate_authority_service.delete_ca_pool.js | 69 +++ ...ty_service.delete_certificate_authority.js | 76 +++ ...ity_service.delete_certificate_template.js | 71 +++ ...y_service.disable_certificate_authority.js | 71 +++ ...ty_service.enable_certificate_authority.js | 71 +++ ...ficate_authority_service.fetch_ca_certs.js | 68 +++ ...service.fetch_certificate_authority_csr.js | 56 ++ ...rtificate_authority_service.get_ca_pool.js | 53 ++ ...icate_authority_service.get_certificate.js | 53 ++ ...ority_service.get_certificate_authority.js | 54 ++ ...service.get_certificate_revocation_list.js | 56 ++ ...hority_service.get_certificate_template.js | 54 ++ ...ificate_authority_service.list_ca_pools.js | 79 +++ ...ty_service.list_certificate_authorities.js | 81 +++ ...rvice.list_certificate_revocation_lists.js | 81 +++ ...rity_service.list_certificate_templates.js | 81 +++ ...ate_authority_service.list_certificates.js | 83 +++ ...te_authority_service.revoke_certificate.js | 74 +++ ..._service.undelete_certificate_authority.js | 71 +++ ...ficate_authority_service.update_ca_pool.js | 73 +++ ...te_authority_service.update_certificate.js | 72 +++ ...ty_service.update_certificate_authority.js | 75 +++ ...vice.update_certificate_revocation_list.js | 75 +++ ...ity_service.update_certificate_template.js | 75 +++ ..._service.activate_certificate_authority.js | 83 +++ ...te_authority_service.create_certificate.js | 81 +++ ...ty_service.create_certificate_authority.js | 83 +++ ...y_service.disable_certificate_authority.js | 71 +++ ...ty_service.enable_certificate_authority.js | 71 +++ ...service.fetch_certificate_authority_csr.js | 56 ++ ...icate_authority_service.get_certificate.js | 53 ++ ...ority_service.get_certificate_authority.js | 54 ++ ...service.get_certificate_revocation_list.js | 56 ++ ...e_authority_service.get_reusable_config.js | 53 ++ ...ty_service.list_certificate_authorities.js | 81 +++ ...rvice.list_certificate_revocation_lists.js | 81 +++ ...ate_authority_service.list_certificates.js | 83 +++ ...authority_service.list_reusable_configs.js | 79 +++ ...y_service.restore_certificate_authority.js | 71 +++ ...te_authority_service.revoke_certificate.js | 73 +++ ...e.schedule_delete_certificate_authority.js | 70 +++ ...te_authority_service.update_certificate.js | 72 +++ ...ty_service.update_certificate_authority.js | 75 +++ ...vice.update_certificate_revocation_list.js | 75 +++ .../certificate_authority_service_client.ts | 259 +++++++- .../src/v1/gapic_metadata.json | 2 +- .../certificate_authority_service_client.ts | 26 +- .../gapic_certificate_authority_service_v1.ts | 566 +++++++++++++++++- 53 files changed, 4355 insertions(+), 20 deletions(-) create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js new file mode 100644 index 00000000000..bd0e84c7ec1 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js @@ -0,0 +1,83 @@ +// 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, pemCaCertificate, subordinateConfig) { + // [START privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Required. The signed CA certificate issued from + * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr]. + */ + // const pemCaCertificate = 'abc123' + /** + * Required. Must include information about the issuer of 'pem_ca_certificate', and any + * further issuers until the self-signed CA. + */ + // const subordinateConfig = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function activateCertificateAuthority() { + // Construct request + const request = { + name, + pemCaCertificate, + subordinateConfig, + }; + + // Run request + const [operation] = await privatecaClient.activateCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + activateCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js new file mode 100644 index 00000000000..962e8004c01 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js @@ -0,0 +1,80 @@ +// 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, caPoolId, caPool) { + // [START privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CaPool][google.cloud.security.privateca.v1.CaPool], in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + */ + // const caPoolId = 'abc123' + /** + * Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values. + */ + // const caPool = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function createCaPool() { + // Construct request + const request = { + parent, + caPoolId, + caPool, + }; + + // Run request + const [operation] = await privatecaClient.createCaPool(request); + const [response] = await operation.promise(); + console.log(response); + } + + createCaPool(); + // [END privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js new file mode 100644 index 00000000000..305a2f85594 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js @@ -0,0 +1,100 @@ +// 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, certificate) { + // [START privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], + * in the format `projects/* /locations/* /caPools/*`. + */ + // const parent = 'abc123' + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][], + * but is optional and its value is ignored otherwise. + */ + // const certificateId = 'abc123' + /** + * Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values. + */ + // const certificate = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. If this is true, no [Certificate][google.cloud.security.privateca.v1.Certificate] resource will be persisted regardless + * of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s [tier][google.cloud.security.privateca.v1.CaPool.tier], and the returned [Certificate][google.cloud.security.privateca.v1.Certificate] + * will not contain the [pem_certificate][google.cloud.security.privateca.v1.Certificate.pem_certificate] field. + */ + // const validateOnly = true + /** + * Optional. The resource ID of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that should issue the + * certificate. This optional field will ignore the load-balancing scheme of + * the Pool and directly issue the certificate from the CA with the specified + * ID, contained in the same [CaPool][google.cloud.security.privateca.v1.CaPool] referenced by `parent`. Per-CA quota + * rules apply. If left empty, a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will be chosen from + * the [CaPool][google.cloud.security.privateca.v1.CaPool] by the service. For example, to issue a [Certificate][google.cloud.security.privateca.v1.Certificate] from + * a Certificate Authority with resource name + * "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", + * you can set the [parent][google.cloud.security.privateca.v1.CreateCertificateRequest.parent] to + * "projects/my-project/locations/us-central1/caPools/my-pool" and the + * [issuing_certificate_authority_id][google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id] to "my-ca". + */ + // const issuingCertificateAuthorityId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function createCertificate() { + // Construct request + const request = { + parent, + certificate, + }; + + // Run request + const response = await privatecaClient.createCertificate(request); + console.log(response); + } + + createCertificate(); + // [END privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js new file mode 100644 index 00000000000..a13d6eb849a --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js @@ -0,0 +1,83 @@ +// 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, certificateAuthorityId, certificateAuthority) { + // [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format + * `projects/* /locations/* /caPools/*`. + */ + // const parent = 'abc123' + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + */ + // const certificateAuthorityId = 'abc123' + /** + * Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values. + */ + // const certificateAuthority = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function createCertificateAuthority() { + // Construct request + const request = { + parent, + certificateAuthorityId, + certificateAuthority, + }; + + // Run request + const [operation] = await privatecaClient.createCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + createCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js new file mode 100644 index 00000000000..bbd379f51be --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js @@ -0,0 +1,83 @@ +// 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, certificateTemplateId, certificateTemplate) { + // [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + */ + // const certificateTemplateId = 'abc123' + /** + * Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values. + */ + // const certificateTemplate = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function createCertificateTemplate() { + // Construct request + const request = { + parent, + certificateTemplateId, + certificateTemplate, + }; + + // Run request + const [operation] = await privatecaClient.createCertificateTemplate( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + createCertificateTemplate(); + // [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js new file mode 100644 index 00000000000..ceda28839a0 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js @@ -0,0 +1,69 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the + * format `projects/* /locations/* /caPools/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function deleteCaPool() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.deleteCaPool(request); + const [response] = await operation.promise(); + console.log(response); + } + + deleteCaPool(); + // [END privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js new file mode 100644 index 00000000000..277627bc2b4 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js @@ -0,0 +1,76 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + /** + * Optional. This field allows the CA to be deleted even if the CA has + * active certs. Active certs include both unrevoked and unexpired certs. + */ + // const ignoreActiveCertificates = true + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function deleteCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.deleteCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + deleteCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js new file mode 100644 index 00000000000..f40afd688bf --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js @@ -0,0 +1,71 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format + * `projects/* /locations/* /certificateTemplates/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function deleteCertificateTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.deleteCertificateTemplate( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + deleteCertificateTemplate(); + // [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js new file mode 100644 index 00000000000..4743cdfc980 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js @@ -0,0 +1,71 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function disableCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.disableCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + disableCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js new file mode 100644 index 00000000000..dc0b92c65b3 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js @@ -0,0 +1,71 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function enableCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.enableCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + enableCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js new file mode 100644 index 00000000000..e83432aabae --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js @@ -0,0 +1,68 @@ +// 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(caPool) { + // [START privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the + * format `projects/* /locations/* /caPools/*`. + */ + // const caPool = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function fetchCaCerts() { + // Construct request + const request = { + caPool, + }; + + // Run request + const response = await privatecaClient.fetchCaCerts(request); + console.log(response); + } + + fetchCaCerts(); + // [END privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js new file mode 100644 index 00000000000..54212f57011 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js @@ -0,0 +1,56 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function fetchCertificateAuthorityCsr() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.fetchCertificateAuthorityCsr( + request + ); + console.log(response); + } + + fetchCertificateAuthorityCsr(); + // [END privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js new file mode 100644 index 00000000000..30d1b20c511 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js @@ -0,0 +1,53 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_GetCaPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCaPool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCaPool(request); + console.log(response); + } + + getCaPool(); + // [END privateca_v1_generated_CertificateAuthorityService_GetCaPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js new file mode 100644 index 00000000000..a7321fada6f --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js @@ -0,0 +1,53 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_GetCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificate(request); + console.log(response); + } + + getCertificate(); + // [END privateca_v1_generated_CertificateAuthorityService_GetCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js new file mode 100644 index 00000000000..684912a75ce --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.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 privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to + * get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificateAuthority(request); + console.log(response); + } + + getCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js new file mode 100644 index 00000000000..bef38230f97 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js @@ -0,0 +1,56 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the + * [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificateRevocationList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificateRevocationList( + request + ); + console.log(response); + } + + getCertificateRevocationList(); + // [END privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js new file mode 100644 index 00000000000..3fea9067343 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_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 privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to + * get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificateTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificateTemplate(request); + console.log(response); + } + + getCertificateTemplate(); + // [END privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js new file mode 100644 index 00000000000..4f5298f14ab --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js @@ -0,0 +1,79 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_ListCaPools_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CaPools][google.cloud.security.privateca.v1.CaPool], in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of [CaPools][google.cloud.security.privateca.v1.CaPool] to + * include in the response. + * Further [CaPools][google.cloud.security.privateca.v1.CaPool] can subsequently be + * obtained by including the + * [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCaPools() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCaPoolsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listCaPools(); + // [END privateca_v1_generated_CertificateAuthorityService_ListCaPools_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js new file mode 100644 index 00000000000..5b87e9ff4de --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js @@ -0,0 +1,81 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format + * `projects/* /locations/* /caPools/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] to + * include in the response. + * Further [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] can subsequently be + * obtained by including the + * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificateAuthorities() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificateAuthoritiesAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificateAuthorities(); + // [END privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js new file mode 100644 index 00000000000..b92ede76dcb --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js @@ -0,0 +1,81 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format + * `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of + * [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] to include in the + * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] + * can subsequently be obtained by including the + * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificateRevocationLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificateRevocationListsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificateRevocationLists(); + // [END privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js new file mode 100644 index 00000000000..0ecc9bd4031 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js @@ -0,0 +1,81 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of + * [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] to include in the response. + * Further [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] can subsequently be + * obtained by including the + * [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificateTemplates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificateTemplatesAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificateTemplates(); + // [END privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js new file mode 100644 index 00000000000..ff842abcc6e --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js @@ -0,0 +1,83 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_ListCertificates_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [Certificates][google.cloud.security.privateca.v1.Certificate], in the format + * `projects/* /locations/* /caPools/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of + * [Certificates][google.cloud.security.privateca.v1.Certificate] to include in the + * response. Further [Certificates][google.cloud.security.privateca.v1.Certificate] can subsequently be obtained + * by including the + * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificates(); + // [END privateca_v1_generated_CertificateAuthorityService_ListCertificates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js new file mode 100644 index 00000000000..799771ff132 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.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(name, reason) { + // [START privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the + * format + * `projects/* /locations/* /caPools/* /certificates/*`. + */ + // const name = 'abc123' + /** + * Required. The [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] for revoking this certificate. + */ + // const reason = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function revokeCertificate() { + // Construct request + const request = { + name, + reason, + }; + + // Run request + const response = await privatecaClient.revokeCertificate(request); + console.log(response); + } + + revokeCertificate(); + // [END privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js new file mode 100644 index 00000000000..ce3eb3d68d3 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js @@ -0,0 +1,71 @@ +// 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 privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function undeleteCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.undeleteCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + undeleteCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js new file mode 100644 index 00000000000..7e327af60b0 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js @@ -0,0 +1,73 @@ +// 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(caPool, updateMask) { + // [START privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated values. + */ + // const caPool = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCaPool() { + // Construct request + const request = { + caPool, + updateMask, + }; + + // Run request + const [operation] = await privatecaClient.updateCaPool(request); + const [response] = await operation.promise(); + console.log(response); + } + + updateCaPool(); + // [END privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js new file mode 100644 index 00000000000..69057977cb7 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js @@ -0,0 +1,72 @@ +// 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(certificate, updateMask) { + // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [Certificate][google.cloud.security.privateca.v1.Certificate] with updated values. + */ + // const certificate = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificate() { + // Construct request + const request = { + certificate, + updateMask, + }; + + // Run request + const response = await privatecaClient.updateCertificate(request); + console.log(response); + } + + updateCertificate(); + // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js new file mode 100644 index 00000000000..6a17b82cf98 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.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(certificateAuthority, updateMask) { + // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with updated values. + */ + // const certificateAuthority = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificateAuthority() { + // Construct request + const request = { + certificateAuthority, + updateMask, + }; + + // Run request + const [operation] = await privatecaClient.updateCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + updateCertificateAuthority(); + // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js new file mode 100644 index 00000000000..4c4a1093d69 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.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(certificateRevocationList, updateMask) { + // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] with updated values. + */ + // const certificateRevocationList = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificateRevocationList() { + // Construct request + const request = { + certificateRevocationList, + updateMask, + }; + + // Run request + const [operation] = await privatecaClient.updateCertificateRevocationList( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + updateCertificateRevocationList(); + // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js new file mode 100644 index 00000000000..4b405388825 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.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(certificateTemplate, updateMask) { + // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with updated values. + */ + // const certificateTemplate = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificateTemplate() { + // Construct request + const request = { + certificateTemplate, + updateMask, + }; + + // Run request + const [operation] = await privatecaClient.updateCertificateTemplate( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + updateCertificateTemplate(); + // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js new file mode 100644 index 00000000000..ea09e603f3e --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js @@ -0,0 +1,83 @@ +// 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, pemCaCertificate, subordinateConfig) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/* /locations/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Required. The signed CA certificate issued from + * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr]. + */ + // const pemCaCertificate = 'abc123' + /** + * Required. Must include information about the issuer of 'pem_ca_certificate', and any + * further issuers until the self-signed CA. + */ + // const subordinateConfig = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function activateCertificateAuthority() { + // Construct request + const request = { + name, + pemCaCertificate, + subordinateConfig, + }; + + // Run request + const [operation] = await privatecaClient.activateCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + activateCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js new file mode 100644 index 00000000000..6c3e1ed52c7 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js @@ -0,0 +1,81 @@ +// 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, certificate) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] + * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format + * `projects/* /locations/* /certificateAuthorities/*`. + */ + // const parent = 'abc123' + /** + * Optional. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a + * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], + * but is optional and its value is ignored otherwise. + */ + // const certificateId = 'abc123' + /** + * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values. + */ + // const certificate = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function createCertificate() { + // Construct request + const request = { + parent, + certificate, + }; + + // Run request + const response = await privatecaClient.createCertificate(request); + console.log(response); + } + + createCertificate(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js new file mode 100644 index 00000000000..03110919f9b --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js @@ -0,0 +1,83 @@ +// 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, certificateAuthorityId, certificateAuthority) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. It must be unique within a location and match the regular + * expression `[a-zA-Z0-9_-]{1,63}` + */ + // const certificateAuthorityId = 'abc123' + /** + * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values. + */ + // const certificateAuthority = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function createCertificateAuthority() { + // Construct request + const request = { + parent, + certificateAuthorityId, + certificateAuthority, + }; + + // Run request + const [operation] = await privatecaClient.createCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + createCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js new file mode 100644 index 00000000000..651f5b7f332 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js @@ -0,0 +1,71 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/* /locations/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function disableCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.disableCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + disableCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js new file mode 100644 index 00000000000..672887f0d77 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js @@ -0,0 +1,71 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/* /locations/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function enableCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.enableCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + enableCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js new file mode 100644 index 00000000000..f5739005fb0 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js @@ -0,0 +1,56 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/* /locations/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function fetchCertificateAuthorityCsr() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.fetchCertificateAuthorityCsr( + request + ); + console.log(response); + } + + fetchCertificateAuthorityCsr(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js new file mode 100644 index 00000000000..dd272d99cd9 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js @@ -0,0 +1,53 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificate(request); + console.log(response); + } + + getCertificate(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js new file mode 100644 index 00000000000..21b01a4bfbf --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.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 privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + * get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificateAuthority(request); + console.log(response); + } + + getCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js new file mode 100644 index 00000000000..87159b06133 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js @@ -0,0 +1,56 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the + * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getCertificateRevocationList() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getCertificateRevocationList( + request + ); + console.log(response); + } + + getCertificateRevocationList(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js new file mode 100644 index 00000000000..233dc45db41 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js @@ -0,0 +1,53 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + */ + // const name = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function getReusableConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await privatecaClient.getReusableConfig(request); + console.log(response); + } + + getReusableConfig(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js new file mode 100644 index 00000000000..ff1e7b04d1b --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js @@ -0,0 +1,81 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + * include in the response. + * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be + * obtained by including the + * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificateAuthorities() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificateAuthoritiesAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificateAuthorities(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js new file mode 100644 index 00000000000..b16b97a9867 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js @@ -0,0 +1,81 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format + * `projects/* /locations/* /certificateauthorities/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of + * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the + * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * can subsequently be obtained by including the + * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificateRevocationLists() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificateRevocationListsAsync( + request + ); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificateRevocationLists(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js new file mode 100644 index 00000000000..48b94181311 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js @@ -0,0 +1,83 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format + * `projects/* /locations/* /certificateauthorities/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of + * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the + * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained + * by including the + * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent + * request. If unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. For details + * on supported filters and syntax, see [Certificates Filtering + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. For details on supported fields + * and syntax, see [Certificates Sorting + * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listCertificates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listCertificatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listCertificates(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js new file mode 100644 index 00000000000..8b0af8bd411 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js @@ -0,0 +1,79 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name of the location associated with the + * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + * `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. Limit on the number of + * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response. + * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be + * obtained by including the + * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If + * unspecified, the server will pick an appropriate default. + */ + // const pageSize = 1234 + /** + * Optional. Pagination token, returned earlier via + * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token]. + */ + // const pageToken = 'abc123' + /** + * Optional. Only include resources that match the filter in the response. + */ + // const filter = 'abc123' + /** + * Optional. Specify how the results should be sorted. + */ + // const orderBy = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function listReusableConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await privatecaClient.listReusableConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + listReusableConfigs(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js new file mode 100644 index 00000000000..f5199f8aaae --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js @@ -0,0 +1,71 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/* /locations/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function restoreCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await privatecaClient.restoreCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + restoreCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js new file mode 100644 index 00000000000..704aa2b45c5 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js @@ -0,0 +1,73 @@ +// 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, reason) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the + * format `projects/* /locations/* /certificateAuthorities/* /certificates/*`. + */ + // const name = 'abc123' + /** + * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate. + */ + // const reason = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function revokeCertificate() { + // Construct request + const request = { + name, + reason, + }; + + // Run request + const response = await privatecaClient.revokeCertificate(request); + console.log(response); + } + + revokeCertificate(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js new file mode 100644 index 00000000000..c4c2c3b8a9b --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js @@ -0,0 +1,70 @@ +// 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 privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * format `projects/* /locations/* /certificateAuthorities/*`. + */ + // const name = 'abc123' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function scheduleDeleteCertificateAuthority() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = + await privatecaClient.scheduleDeleteCertificateAuthority(request); + const [response] = await operation.promise(); + console.log(response); + } + + scheduleDeleteCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js new file mode 100644 index 00000000000..868bcd71321 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js @@ -0,0 +1,72 @@ +// 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(certificate, updateMask) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values. + */ + // const certificate = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificate() { + // Construct request + const request = { + certificate, + updateMask, + }; + + // Run request + const response = await privatecaClient.updateCertificate(request); + console.log(response); + } + + updateCertificate(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js new file mode 100644 index 00000000000..5c55a8ec8ea --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.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(certificateAuthority, updateMask) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values. + */ + // const certificateAuthority = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificateAuthority() { + // Construct request + const request = { + certificateAuthority, + updateMask, + }; + + // Run request + const [operation] = await privatecaClient.updateCertificateAuthority( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + updateCertificateAuthority(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js new file mode 100644 index 00000000000..3a58b9f8044 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.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(certificateRevocationList, updateMask) { + // [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values. + */ + // const certificateRevocationList = '' + /** + * Required. A list of fields to be updated in this request. + */ + // const updateMask = '' + /** + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + */ + // const requestId = 'abc123' + + // Imports the Privateca library + const {CertificateAuthorityServiceClient} = + require('@google-cloud/security-private-ca').v1beta1; + + // Instantiates a client + const privatecaClient = new CertificateAuthorityServiceClient(); + + async function updateCertificateRevocationList() { + // Construct request + const request = { + certificateRevocationList, + updateMask, + }; + + // Run request + const [operation] = await privatecaClient.updateCertificateRevocationList( + request + ); + const [response] = await operation.promise(); + console.log(response); + } + + updateCertificateRevocationList(); + // [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 12b7e996e55..69e3217f6ad 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -26,6 +26,10 @@ import { LROperation, PaginationCallback, GaxCall, + IamClient, + IamProtos, + LocationsClient, + LocationProtos, } from 'google-gax'; import {Transform} from 'stream'; @@ -64,6 +68,8 @@ export class CertificateAuthorityServiceClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + iamClient: IamClient; + locationsClient: LocationsClient; pathTemplates: {[name: string]: gax.PathTemplate}; operationsClient: gax.OperationsClient; certificateAuthorityServiceStub?: Promise<{[name: string]: Function}>; @@ -145,6 +151,9 @@ export class CertificateAuthorityServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } + this.iamClient = new IamClient(this._gaxGrpc, opts); + + this.locationsClient = new LocationsClient(this._gaxGrpc, opts); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -4110,7 +4119,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificates.createStream( this.innerApiCalls.listCertificates as gax.GaxCall, @@ -4176,7 +4186,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, @@ -4345,7 +4356,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificateAuthorities']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateAuthorities.createStream( this.innerApiCalls.listCertificateAuthorities as gax.GaxCall, @@ -4407,7 +4419,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificateAuthorities']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, @@ -4572,7 +4585,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCaPools']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCaPools.createStream( this.innerApiCalls.listCaPools as gax.GaxCall, @@ -4634,7 +4648,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCaPools']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCaPools.asyncIterate( this.innerApiCalls['listCaPools'] as GaxCall, @@ -4803,7 +4818,9 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listCertificateRevocationLists']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateRevocationLists.createStream( this.innerApiCalls.listCertificateRevocationLists as gax.GaxCall, @@ -4865,7 +4882,9 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listCertificateRevocationLists']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, @@ -5034,7 +5053,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificateTemplates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateTemplates.createStream( this.innerApiCalls.listCertificateTemplates as gax.GaxCall, @@ -5096,7 +5116,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificateTemplates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateTemplates.asyncIterate( this.innerApiCalls['listCertificateTemplates'] as GaxCall, @@ -5104,6 +5125,222 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } + /** + * Gets the access control policy for a resource. Returns an empty policy + * if the resource exists and does not have a policy set. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {Object} [request.options] + * OPTIONAL: A `GetPolicyOptions` object for specifying options to + * `GetIamPolicy`. This field is only used by Cloud IAM. + * + * This object should have the same structure as [GetPolicyOptions]{@link google.iam.v1.GetPolicyOptions} + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [Policy]{@link google.iam.v1.Policy}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Policy]{@link google.iam.v1.Policy}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + getIamPolicy( + request: IamProtos.google.iam.v1.GetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.getIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + */ + setIamPolicy( + request: IamProtos.google.iam.v1.SetIamPolicyRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.Policy, + IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.setIamPolicy(request, options, callback); + } + + /** + * Returns permissions that a caller has on the specified resource. If the + * resource does not exist, this will return an empty set of + * permissions, not a NOT_FOUND error. + * + * Note: This operation is designed to be used for building + * permission-aware UIs and command-line tools, not for authorization + * checking. This operation may "fail open" without warning. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.resource + * REQUIRED: The resource for which the policy detail is being requested. + * See the operation documentation for the appropriate value for this field. + * @param {string[]} request.permissions + * The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more + * information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @param {Object} [options] + * Optional parameters. You can override the default settings for this call, e.g, timeout, + * retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details. + * @param {function(?Error, ?Object)} [callback] + * The function which will be called with the result of the API call. + * + * The second parameter to the callback is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [TestIamPermissionsResponse]{@link google.iam.v1.TestIamPermissionsResponse}. + * The promise has a method named "cancel" which cancels the ongoing API call. + * + */ + testIamPermissions( + request: IamProtos.google.iam.v1.TestIamPermissionsRequest, + options?: + | gax.CallOptions + | Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + IamProtos.google.iam.v1.TestIamPermissionsResponse, + IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, + {} | null | undefined + > + ): Promise { + return this.iamClient.testIamPermissions(request, options, callback); + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @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 [Location]{@link google.cloud.location.Location}. + * 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.getLocation(request); + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + + /** + * Lists information about the supported locations for this service. 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.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @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 + * [Location]{@link google.cloud.location.Location}. 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.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + // -------------------- // -- Path templates -- // -------------------- @@ -5515,6 +5752,8 @@ export class CertificateAuthorityServiceClient { return this.certificateAuthorityServiceStub!.then(stub => { this._terminated = true; stub.close(); + this.iamClient.close(); + this.locationsClient.close(); this.operationsClient.close(); }); } diff --git a/packages/google-cloud-security-privateca/src/v1/gapic_metadata.json b/packages/google-cloud-security-privateca/src/v1/gapic_metadata.json index 3bdcc22fd7e..dc371ea2a56 100644 --- a/packages/google-cloud-security-privateca/src/v1/gapic_metadata.json +++ b/packages/google-cloud-security-privateca/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.security.privateca.v1", - "libraryPackage": "@google-cloud/privateca", + "libraryPackage": "@google-cloud/security-private-ca", "services": { "CertificateAuthorityService": { "clients": { diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index e48ce19c085..e7774cdef03 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -2826,7 +2826,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificates.createStream( this.innerApiCalls.listCertificates as gax.GaxCall, @@ -2892,7 +2893,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificates']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, @@ -3061,7 +3063,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificateAuthorities']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateAuthorities.createStream( this.innerApiCalls.listCertificateAuthorities as gax.GaxCall, @@ -3123,7 +3126,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listCertificateAuthorities']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, @@ -3292,7 +3296,9 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listCertificateRevocationLists']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateRevocationLists.createStream( this.innerApiCalls.listCertificateRevocationLists as gax.GaxCall, @@ -3354,7 +3360,9 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = + this._defaults['listCertificateRevocationLists']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, @@ -3519,7 +3527,8 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listReusableConfigs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReusableConfigs.createStream( this.innerApiCalls.listReusableConfigs as gax.GaxCall, @@ -3581,7 +3590,8 @@ export class CertificateAuthorityServiceClient { parent: request.parent || '', }); options = options || {}; - const callSettings = new gax.CallSettings(options); + const defaultCallSettings = this._defaults['listReusableConfigs']; + const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReusableConfigs.asyncIterate( this.innerApiCalls['listReusableConfigs'] as GaxCall, diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 7ad216f9cba..52414963a14 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -25,7 +25,13 @@ import * as certificateauthorityserviceModule from '../src'; import {PassThrough} from 'stream'; -import {protobuf, LROperation, operationsProtos} from 'google-gax'; +import { + protobuf, + LROperation, + operationsProtos, + IamProtos, + LocationProtos, +} from 'google-gax'; function generateSampleMessage(instance: T) { const filledObject = ( @@ -6200,6 +6206,564 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); }); }); + describe('getIamPolicy', () => { + it('invokes getIamPolicy without error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.getIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getIamPolicy without error using callback', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.getIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.getIamPolicy as SinonStub).getCall(0)); + }); + it('invokes getIamPolicy with error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.GetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.getIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.getIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('setIamPolicy', () => { + it('invokes setIamPolicy without error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = stubSimpleCall(expectedResponse); + const response = await client.setIamPolicy(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes setIamPolicy without error using callback', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.Policy() + ); + client.iamClient.setIamPolicy = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setIamPolicy( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.Policy | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.setIamPolicy as SinonStub).getCall(0)); + }); + it('invokes setIamPolicy with error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.SetIamPolicyRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.setIamPolicy = stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.setIamPolicy(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.setIamPolicy as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('testIamPermissions', () => { + it('invokes testIamPermissions without error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = stubSimpleCall(expectedResponse); + const response = await client.testIamPermissions( + request, + expectedOptions + ); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes testIamPermissions without error using callback', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsResponse() + ); + client.iamClient.testIamPermissions = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.testIamPermissions( + request, + expectedOptions, + ( + err?: Error | null, + result?: IamProtos.google.iam.v1.TestIamPermissionsResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.iamClient.testIamPermissions as SinonStub).getCall(0)); + }); + it('invokes testIamPermissions with error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new IamProtos.google.iam.v1.TestIamPermissionsRequest() + ); + request.resource = ''; + const expectedHeaderRequestParams = 'resource='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.iamClient.testIamPermissions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.testIamPermissions(request, expectedOptions), + expectedError + ); + assert( + (client.iamClient.testIamPermissions as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location() + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert.strictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], + expectedHeaderRequestParams + ); + }); + }); describe('Path templates', () => { describe('caPool', () => { From 68196f12299a8cbd3e86a2846aa2b6faae889be7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 6 Oct 2021 18:18:14 +0000 Subject: [PATCH 063/113] chore: release 2.5.0 (#132) :robot: I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.4.1...v2.5.0) (2021-10-06) ### Features * **privateca:** add IAMPolicy & Locations mix-in support ([ca2312e](https://www.github.com/googleapis/nodejs-security-private-ca/commit/ca2312e60999e6068f92405922f1df1737d8a1ed)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 1f1af9ea07f..a3251bab89d 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.5.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.4.1...v2.5.0) (2021-10-06) + + +### Features + +* **privateca:** add IAMPolicy & Locations mix-in support ([ca2312e](https://www.github.com/googleapis/nodejs-security-private-ca/commit/ca2312e60999e6068f92405922f1df1737d8a1ed)) + ### [2.4.1](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.4.0...v2.4.1) (2021-09-10) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 21f7390db95..bbaa1549d72 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.4.1", + "version": "2.5.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 499b2386699..ff5506e7864 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.4.1" + "@google-cloud/security-private-ca": "^2.5.0" }, "devDependencies": { "c8": "^7.1.0", From f3c99a7078dcac3d6f7ba43d6b718dba4fcd782a 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:31 +0000 Subject: [PATCH 064/113] build(node): update deps used during postprocessing (#1243) (#133) --- .../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-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index 8a4c8775352..e1b5808c8b7 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -15280,7 +15280,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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index c10e96d1ef1..7b9035a0343 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -37727,6 +37727,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); @@ -37737,6 +37738,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; })(); @@ -44809,6 +44811,7 @@ case 4: case 5: case 6: + case 7: break; } } @@ -44913,6 +44916,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-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index caa4550d69d..c769426556f 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -5126,7 +5126,8 @@ "OUTPUT_ONLY": 3, "INPUT_ONLY": 4, "IMMUTABLE": 5, - "UNORDERED_LIST": 6 + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 } }, "resourceReference": { @@ -5872,6 +5873,18 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 From 70b152e18488db2d2ee2f49ffb8a0861d7e87256 Mon Sep 17 00:00:00 2001 From: "F. Hinkelmann" Date: Fri, 22 Oct 2021 13:21:51 -0400 Subject: [PATCH 065/113] chore(cloud-rad): delete api-extractor config (#134) --- .../api-extractor.json | 369 ------------------ 1 file changed, 369 deletions(-) delete mode 100644 packages/google-cloud-security-privateca/api-extractor.json diff --git a/packages/google-cloud-security-privateca/api-extractor.json b/packages/google-cloud-security-privateca/api-extractor.json deleted file mode 100644 index de228294b23..00000000000 --- a/packages/google-cloud-security-privateca/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 ef746687a033e32928715aa3141fadd0e153bd5a Mon Sep 17 00:00:00 2001 From: Takashi Matsuo Date: Wed, 27 Oct 2021 11:26:26 -0700 Subject: [PATCH 066/113] chore: fix the wrong post processor image (#137) --- packages/google-cloud-security-privateca/.github/.OwlBot.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/.github/.OwlBot.yaml b/packages/google-cloud-security-privateca/.github/.OwlBot.yaml index 4ffd0b02456..5acb4422c01 100644 --- a/packages/google-cloud-security-privateca/.github/.OwlBot.yaml +++ b/packages/google-cloud-security-privateca/.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: - /owl-bot-staging From 8c8856e741beba95e380dcdf0ecf4c507f543cd8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 27 Oct 2021 20:46:38 +0200 Subject: [PATCH 067/113] chore(deps): update dependency @types/node to v16 (#135) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index bbaa1549d72..8d161b884e7 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/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": "^2.0.2", From e4e932e6d7596be730a9dc2d40144e03567976e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 29 Oct 2021 09:02:24 -0700 Subject: [PATCH 068/113] docs: fix docstring formatting (#136) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: fix docstring formatting Committer: @parthea PiperOrigin-RevId: 405687537 Source-Link: https://github.com/googleapis/googleapis/commit/5f897f0cd68ea0d7729fa3edb6b61d66dff81ece Source-Link: https://github.com/googleapis/googleapis-gen/commit/f75643a54f3b681eb1c8c73e8002c1dd7d2bd5fe Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjc1NjQzYTU0ZjNiNjgxZWIxYzhjNzNlODAwMmMxZGQ3ZDJiZDVmZSJ9 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Takashi Matsuo --- .../cloud/security/privateca/v1beta1/resources.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto index 937e931d663..f2bf7de0f12 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto @@ -71,11 +71,11 @@ message CertificateAuthority { message AllowedSubjectAltNames { // Optional. Contains valid, fully-qualified host names. Glob patterns are also // supported. To allow an explicit wildcard certificate, escape with - // backlash (i.e. "\*"). - // E.g. for globbed entries: '*bar.com' will allow foo.bar.com, but not - // *.bar.com, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set. - // E.g. for wildcard entries: '\*.bar.com' will allow '*.bar.com', but not - // 'foo.bar.com'. + // backlash (i.e. `\*`). + // E.g. for globbed entries: `*bar.com` will allow `foo.bar.com`, but not + // `*.bar.com`, unless the [allow_globbing_dns_wildcards][google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.allow_globbing_dns_wildcards] field is set. + // E.g. for wildcard entries: `\*.bar.com` will allow `*.bar.com`, but not + // `foo.bar.com`. repeated string allowed_dns_names = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Contains valid RFC 3986 URIs. Glob patterns are also supported. To From da9b53437badc9f41856b19c125ff61aa5b69601 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Nov 2021 20:42:33 +0100 Subject: [PATCH 069/113] chore(deps): update dependency sinon to v12 (#138) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 8d161b884e7..ef8abf94706 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -54,7 +54,7 @@ "mocha": "^8.1.2", "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", "webpack": "^5.0.0", From 78cae854e7218de6cd8d687b889fac799a408863 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:38:25 +0000 Subject: [PATCH 070/113] docs(samples): add example tags to generated samples (#139) - [ ] Regenerate this pull request now. 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 --- .../linkinator.config.json | 2 +- ..._service.activate_certificate_authority.js | 10 +- ...ficate_authority_service.create_ca_pool.js | 10 +- ...te_authority_service.create_certificate.js | 30 +- ...ty_service.create_certificate_authority.js | 12 +- ...ity_service.create_certificate_template.js | 10 +- ...ficate_authority_service.delete_ca_pool.js | 6 +- ...ty_service.delete_certificate_authority.js | 6 +- ...ity_service.delete_certificate_template.js | 6 +- ...y_service.disable_certificate_authority.js | 6 +- ...ty_service.enable_certificate_authority.js | 6 +- ...ficate_authority_service.fetch_ca_certs.js | 6 +- ...service.fetch_certificate_authority_csr.js | 6 +- ...rtificate_authority_service.get_ca_pool.js | 6 +- ...icate_authority_service.get_certificate.js | 6 +- ...ority_service.get_certificate_authority.js | 6 +- ...service.get_certificate_revocation_list.js | 8 +- ...hority_service.get_certificate_template.js | 6 +- ...ificate_authority_service.list_ca_pools.js | 14 +- ...ty_service.list_certificate_authorities.js | 16 +- ...rvice.list_certificate_revocation_lists.js | 14 +- ...rity_service.list_certificate_templates.js | 14 +- ...ate_authority_service.list_certificates.js | 22 +- ...te_authority_service.revoke_certificate.js | 10 +- ..._service.undelete_certificate_authority.js | 6 +- ...ficate_authority_service.update_ca_pool.js | 10 +- ...te_authority_service.update_certificate.js | 10 +- ...ty_service.update_certificate_authority.js | 10 +- ...vice.update_certificate_revocation_list.js | 10 +- ...ity_service.update_certificate_template.js | 10 +- ..._service.activate_certificate_authority.js | 10 +- ...te_authority_service.create_certificate.js | 14 +- ...ty_service.create_certificate_authority.js | 10 +- ...y_service.disable_certificate_authority.js | 6 +- ...ty_service.enable_certificate_authority.js | 6 +- ...service.fetch_certificate_authority_csr.js | 6 +- ...icate_authority_service.get_certificate.js | 6 +- ...ority_service.get_certificate_authority.js | 6 +- ...service.get_certificate_revocation_list.js | 8 +- ...e_authority_service.get_reusable_config.js | 6 +- ...ty_service.list_certificate_authorities.js | 14 +- ...rvice.list_certificate_revocation_lists.js | 14 +- ...ate_authority_service.list_certificates.js | 22 +- ...authority_service.list_reusable_configs.js | 14 +- ...y_service.restore_certificate_authority.js | 6 +- ...te_authority_service.revoke_certificate.js | 10 +- ...e.schedule_delete_certificate_authority.js | 6 +- ...te_authority_service.update_certificate.js | 10 +- ...ty_service.update_certificate_authority.js | 10 +- ...vice.update_certificate_revocation_list.js | 10 +- .../certificate_authority_service_client.ts | 2012 ++++++++--------- .../certificate_authority_service_client.ts | 1354 ++++++----- 52 files changed, 1867 insertions(+), 1987 deletions(-) diff --git a/packages/google-cloud-security-privateca/linkinator.config.json b/packages/google-cloud-security-privateca/linkinator.config.json index 29a223b6db6..0121dfa684f 100644 --- a/packages/google-cloud-security-privateca/linkinator.config.json +++ b/packages/google-cloud-security-privateca/linkinator.config.json @@ -6,5 +6,5 @@ "img.shields.io" ], "silent": true, - "concurrency": 10 + "concurrency": 5 } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js index bd0e84c7ec1..1dbf9b2d397 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js @@ -20,20 +20,20 @@ function main(name, pemCaCertificate, subordinateConfig) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const name = 'abc123' /** * Required. The signed CA certificate issued from - * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr]. + * FetchCertificateAuthorityCsrResponse.pem_csr google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse.pem_csr. */ // const pemCaCertificate = 'abc123' /** * Required. Must include information about the issuer of 'pem_ca_certificate', and any * further issuers until the self-signed CA. */ - // const subordinateConfig = '' + // const subordinateConfig = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -56,7 +56,7 @@ function main(name, pemCaCertificate, subordinateConfig) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function activateCertificateAuthority() { + async function callActivateCertificateAuthority() { // Construct request const request = { name, @@ -72,7 +72,7 @@ function main(name, pemCaCertificate, subordinateConfig) { console.log(response); } - activateCertificateAuthority(); + callActivateCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js index 962e8004c01..a548f199fdf 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js @@ -21,7 +21,7 @@ function main(parent, caPoolId, caPool) { */ /** * Required. The resource name of the location associated with the - * [CaPool][google.cloud.security.privateca.v1.CaPool], in the format `projects/* /locations/*`. + * CaPool google.cloud.security.privateca.v1.CaPool, in the format `projects/* /locations/*`. */ // const parent = 'abc123' /** @@ -30,9 +30,9 @@ function main(parent, caPoolId, caPool) { */ // const caPoolId = 'abc123' /** - * Required. A [CaPool][google.cloud.security.privateca.v1.CaPool] with initial field values. + * Required. A CaPool google.cloud.security.privateca.v1.CaPool with initial field values. */ - // const caPool = '' + // const caPool = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -55,7 +55,7 @@ function main(parent, caPoolId, caPool) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function createCaPool() { + async function callCreateCaPool() { // Construct request const request = { parent, @@ -69,7 +69,7 @@ function main(parent, caPoolId, caPool) { console.log(response); } - createCaPool(); + callCreateCaPool(); // [END privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js index 305a2f85594..c973ae5c605 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js @@ -20,21 +20,21 @@ function main(parent, certificate) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the [Certificate][google.cloud.security.privateca.v1.Certificate], + * Required. The resource name of the CaPool google.cloud.security.privateca.v1.CaPool associated with the Certificate google.cloud.security.privateca.v1.Certificate, * in the format `projects/* /locations/* /caPools/*`. */ // const parent = 'abc123' /** * Optional. It must be unique within a location and match the regular * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - * [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][], + * CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the Enterprise CertificateAuthority.Tier , * but is optional and its value is ignored otherwise. */ // const certificateId = 'abc123' /** - * Required. A [Certificate][google.cloud.security.privateca.v1.Certificate] with initial field values. + * Required. A Certificate google.cloud.security.privateca.v1.Certificate with initial field values. */ - // const certificate = '' + // const certificate = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -50,23 +50,23 @@ function main(parent, certificate) { */ // const requestId = 'abc123' /** - * Optional. If this is true, no [Certificate][google.cloud.security.privateca.v1.Certificate] resource will be persisted regardless - * of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s [tier][google.cloud.security.privateca.v1.CaPool.tier], and the returned [Certificate][google.cloud.security.privateca.v1.Certificate] - * will not contain the [pem_certificate][google.cloud.security.privateca.v1.Certificate.pem_certificate] field. + * Optional. If this is true, no Certificate google.cloud.security.privateca.v1.Certificate resource will be persisted regardless + * of the CaPool google.cloud.security.privateca.v1.CaPool's tier google.cloud.security.privateca.v1.CaPool.tier, and the returned Certificate google.cloud.security.privateca.v1.Certificate + * will not contain the pem_certificate google.cloud.security.privateca.v1.Certificate.pem_certificate field. */ // const validateOnly = true /** - * Optional. The resource ID of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that should issue the + * Optional. The resource ID of the CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority that should issue the * certificate. This optional field will ignore the load-balancing scheme of * the Pool and directly issue the certificate from the CA with the specified - * ID, contained in the same [CaPool][google.cloud.security.privateca.v1.CaPool] referenced by `parent`. Per-CA quota - * rules apply. If left empty, a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will be chosen from - * the [CaPool][google.cloud.security.privateca.v1.CaPool] by the service. For example, to issue a [Certificate][google.cloud.security.privateca.v1.Certificate] from + * ID, contained in the same CaPool google.cloud.security.privateca.v1.CaPool referenced by `parent`. Per-CA quota + * rules apply. If left empty, a CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority will be chosen from + * the CaPool google.cloud.security.privateca.v1.CaPool by the service. For example, to issue a Certificate google.cloud.security.privateca.v1.Certificate from * a Certificate Authority with resource name * "projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca", - * you can set the [parent][google.cloud.security.privateca.v1.CreateCertificateRequest.parent] to + * you can set the parent google.cloud.security.privateca.v1.CreateCertificateRequest.parent to * "projects/my-project/locations/us-central1/caPools/my-pool" and the - * [issuing_certificate_authority_id][google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id] to "my-ca". + * issuing_certificate_authority_id google.cloud.security.privateca.v1.CreateCertificateRequest.issuing_certificate_authority_id to "my-ca". */ // const issuingCertificateAuthorityId = 'abc123' @@ -77,7 +77,7 @@ function main(parent, certificate) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function createCertificate() { + async function callCreateCertificate() { // Construct request const request = { parent, @@ -89,7 +89,7 @@ function main(parent, certificate) { console.log(response); } - createCertificate(); + callCreateCertificate(); // [END privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js index a13d6eb849a..c196857cda2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js @@ -20,8 +20,8 @@ function main(parent, certificateAuthorityId, certificateAuthority) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the - * [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format + * Required. The resource name of the CaPool google.cloud.security.privateca.v1.CaPool associated with the + * CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority, in the format * `projects/* /locations/* /caPools/*`. */ // const parent = 'abc123' @@ -31,9 +31,9 @@ function main(parent, certificateAuthorityId, certificateAuthority) { */ // const certificateAuthorityId = 'abc123' /** - * Required. A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with initial field values. + * Required. A CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority with initial field values. */ - // const certificateAuthority = '' + // const certificateAuthority = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -56,7 +56,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function createCertificateAuthority() { + async function callCreateCertificateAuthority() { // Construct request const request = { parent, @@ -72,7 +72,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { console.log(response); } - createCertificateAuthority(); + callCreateCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js index bbd379f51be..66428f59f2e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js @@ -21,7 +21,7 @@ function main(parent, certificateTemplateId, certificateTemplate) { */ /** * Required. The resource name of the location associated with the - * [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate], in the format + * CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate, in the format * `projects/* /locations/*`. */ // const parent = 'abc123' @@ -31,9 +31,9 @@ function main(parent, certificateTemplateId, certificateTemplate) { */ // const certificateTemplateId = 'abc123' /** - * Required. A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with initial field values. + * Required. A CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate with initial field values. */ - // const certificateTemplate = '' + // const certificateTemplate = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -56,7 +56,7 @@ function main(parent, certificateTemplateId, certificateTemplate) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function createCertificateTemplate() { + async function callCreateCertificateTemplate() { // Construct request const request = { parent, @@ -72,7 +72,7 @@ function main(parent, certificateTemplateId, certificateTemplate) { console.log(response); } - createCertificateTemplate(); + callCreateCertificateTemplate(); // [END privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js index ceda28839a0..f46c8317fe1 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the + * Required. The resource name for this CaPool google.cloud.security.privateca.v1.CaPool in the * format `projects/* /locations/* /caPools/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function deleteCaPool() { + async function callDeleteCaPool() { // Construct request const request = { name, @@ -58,7 +58,7 @@ function main(name) { console.log(response); } - deleteCaPool(); + callDeleteCaPool(); // [END privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js index 277627bc2b4..47d2db55f63 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -51,7 +51,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function deleteCertificateAuthority() { + async function callDeleteCertificateAuthority() { // Construct request const request = { name, @@ -65,7 +65,7 @@ function main(name) { console.log(response); } - deleteCertificateAuthority(); + callDeleteCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js index f40afd688bf..0cd1530dddc 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format + * Required. The resource name for this CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate in the format * `projects/* /locations/* /certificateTemplates/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function deleteCertificateTemplate() { + async function callDeleteCertificateTemplate() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - deleteCertificateTemplate(); + callDeleteCertificateTemplate(); // [END privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js index 4743cdfc980..80765a5c979 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function disableCertificateAuthority() { + async function callDisableCertificateAuthority() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - disableCertificateAuthority(); + callDisableCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js index dc0b92c65b3..f97901efc59 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function enableCertificateAuthority() { + async function callEnableCertificateAuthority() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - enableCertificateAuthority(); + callEnableCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js index e83432aabae..b15aa304978 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js @@ -20,7 +20,7 @@ function main(caPool) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for the [CaPool][google.cloud.security.privateca.v1.CaPool] in the + * Required. The resource name for the CaPool google.cloud.security.privateca.v1.CaPool in the * format `projects/* /locations/* /caPools/*`. */ // const caPool = 'abc123' @@ -46,7 +46,7 @@ function main(caPool) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function fetchCaCerts() { + async function callFetchCaCerts() { // Construct request const request = { caPool, @@ -57,7 +57,7 @@ function main(caPool) { console.log(response); } - fetchCaCerts(); + callFetchCaCerts(); // [END privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js index 54212f57011..b1f4ff11b21 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function fetchCertificateAuthorityCsr() { + async function callFetchCertificateAuthorityCsr() { // Construct request const request = { name, @@ -45,7 +45,7 @@ function main(name) { console.log(response); } - fetchCertificateAuthorityCsr(); + callFetchCertificateAuthorityCsr(); // [END privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js index 30d1b20c511..182037ecdaa 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1.CaPool.name] of the [CaPool][google.cloud.security.privateca.v1.CaPool] to get. + * Required. The name google.cloud.security.privateca.v1.CaPool.name of the CaPool google.cloud.security.privateca.v1.CaPool to get. */ // const name = 'abc123' @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCaPool() { + async function callGetCaPool() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getCaPool(); + callGetCaPool(); // [END privateca_v1_generated_CertificateAuthorityService_GetCaPool_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js index a7321fada6f..49032f5a7e4 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1.Certificate] to get. + * Required. The name google.cloud.security.privateca.v1.Certificate.name of the Certificate google.cloud.security.privateca.v1.Certificate to get. */ // const name = 'abc123' @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificate() { + async function callGetCertificate() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getCertificate(); + callGetCertificate(); // [END privateca_v1_generated_CertificateAuthorityService_GetCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js index 684912a75ce..bd0690bda09 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] to + * Required. The name google.cloud.security.privateca.v1.CertificateAuthority.name of the CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority to * get. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificateAuthority() { + async function callGetCertificateAuthority() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getCertificateAuthority(); + callGetCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js index bef38230f97..b7c72c60562 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js @@ -20,8 +20,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1.CertificateRevocationList.name] of the - * [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] to get. + * Required. The name google.cloud.security.privateca.v1.CertificateRevocationList.name of the + * CertificateRevocationList google.cloud.security.privateca.v1.CertificateRevocationList to get. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificateRevocationList() { + async function callGetCertificateRevocationList() { // Construct request const request = { name, @@ -45,7 +45,7 @@ function main(name) { console.log(response); } - getCertificateRevocationList(); + callGetCertificateRevocationList(); // [END privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js index 3fea9067343..12937ba06ff 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1.CertificateTemplate.name] of the [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] to + * Required. The name google.cloud.security.privateca.v1.CertificateTemplate.name of the CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate to * get. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificateTemplate() { + async function callGetCertificateTemplate() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getCertificateTemplate(); + callGetCertificateTemplate(); // [END privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js index 4f5298f14ab..2753ad847bb 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js @@ -21,22 +21,22 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [CaPools][google.cloud.security.privateca.v1.CaPool], in the format + * CaPools google.cloud.security.privateca.v1.CaPool, in the format * `projects/* /locations/*`. */ // const parent = 'abc123' /** - * Optional. Limit on the number of [CaPools][google.cloud.security.privateca.v1.CaPool] to + * Optional. Limit on the number of CaPools google.cloud.security.privateca.v1.CaPool to * include in the response. - * Further [CaPools][google.cloud.security.privateca.v1.CaPool] can subsequently be + * Further CaPools google.cloud.security.privateca.v1.CaPool can subsequently be * obtained by including the - * [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token] in a subsequent + * ListCaPoolsResponse.next_page_token google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCaPoolsResponse.next_page_token][google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token]. + * ListCaPoolsResponse.next_page_token google.cloud.security.privateca.v1.ListCaPoolsResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCaPools() { + async function callListCaPools() { // Construct request const request = { parent, @@ -68,7 +68,7 @@ function main(parent) { } } - listCaPools(); + callListCaPools(); // [END privateca_v1_generated_CertificateAuthorityService_ListCaPools_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js index 5b87e9ff4de..ba74e6a75b2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js @@ -20,23 +20,23 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the [CaPool][google.cloud.security.privateca.v1.CaPool] associated with the - * [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority], in the format + * Required. The resource name of the CaPool google.cloud.security.privateca.v1.CaPool associated with the + * CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority, in the format * `projects/* /locations/* /caPools/*`. */ // const parent = 'abc123' /** - * Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] to + * Optional. Limit on the number of CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority to * include in the response. - * Further [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] can subsequently be + * Further CertificateAuthorities google.cloud.security.privateca.v1.CertificateAuthority can subsequently be * obtained by including the - * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + * ListCertificateAuthoritiesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token]. + * ListCertificateAuthoritiesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificateAuthorities() { + async function callListCertificateAuthorities() { // Construct request const request = { parent, @@ -70,7 +70,7 @@ function main(parent) { } } - listCertificateAuthorities(); + callListCertificateAuthorities(); // [END privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js index b92ede76dcb..d699bb9ba2f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js @@ -21,22 +21,22 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList], in the format + * CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList, in the format * `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const parent = 'abc123' /** * Optional. Limit on the number of - * [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] to include in the - * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList] + * CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList to include in the + * response. Further CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList * can subsequently be obtained by including the - * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + * ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token]. + * ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificateRevocationLists() { + async function callListCertificateRevocationLists() { // Construct request const request = { parent, @@ -70,7 +70,7 @@ function main(parent) { } } - listCertificateRevocationLists(); + callListCertificateRevocationLists(); // [END privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js index 0ecc9bd4031..aadc7259ef9 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js @@ -21,22 +21,22 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate], in the format + * CertificateTemplates google.cloud.security.privateca.v1.CertificateTemplate, in the format * `projects/* /locations/*`. */ // const parent = 'abc123' /** * Optional. Limit on the number of - * [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] to include in the response. - * Further [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate] can subsequently be + * CertificateTemplates google.cloud.security.privateca.v1.CertificateTemplate to include in the response. + * Further CertificateTemplates google.cloud.security.privateca.v1.CertificateTemplate can subsequently be * obtained by including the - * [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token] in a subsequent + * ListCertificateTemplatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificateTemplatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token]. + * ListCertificateTemplatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateTemplatesResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificateTemplates() { + async function callListCertificateTemplates() { // Construct request const request = { parent, @@ -70,7 +70,7 @@ function main(parent) { } } - listCertificateTemplates(); + callListCertificateTemplates(); // [END privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js index ff842abcc6e..5074b79c674 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js @@ -21,34 +21,34 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [Certificates][google.cloud.security.privateca.v1.Certificate], in the format + * Certificates google.cloud.security.privateca.v1.Certificate, in the format * `projects/* /locations/* /caPools/*`. */ // const parent = 'abc123' /** * Optional. Limit on the number of - * [Certificates][google.cloud.security.privateca.v1.Certificate] to include in the - * response. Further [Certificates][google.cloud.security.privateca.v1.Certificate] can subsequently be obtained + * Certificates google.cloud.security.privateca.v1.Certificate to include in the + * response. Further Certificates google.cloud.security.privateca.v1.Certificate can subsequently be obtained * by including the - * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token] in a subsequent + * ListCertificatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token]. + * ListCertificatesResponse.next_page_token google.cloud.security.privateca.v1.ListCertificatesResponse.next_page_token. */ // const pageToken = 'abc123' /** * Optional. Only include resources that match the filter in the response. For details - * on supported filters and syntax, see [Certificates Filtering - * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + * on supported filters and syntax, see Certificates Filtering + * documentation (https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). */ // const filter = 'abc123' /** * Optional. Specify how the results should be sorted. For details on supported fields - * and syntax, see [Certificates Sorting - * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + * and syntax, see Certificates Sorting + * documentation (https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). */ // const orderBy = 'abc123' @@ -59,7 +59,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificates() { + async function callListCertificates() { // Construct request const request = { parent, @@ -72,7 +72,7 @@ function main(parent) { } } - listCertificates(); + callListCertificates(); // [END privateca_v1_generated_CertificateAuthorityService_ListCertificates_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js index 799771ff132..9bf99452349 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js @@ -20,15 +20,15 @@ function main(name, reason) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the + * Required. The resource name for this Certificate google.cloud.security.privateca.v1.Certificate in the * format * `projects/* /locations/* /caPools/* /certificates/*`. */ // const name = 'abc123' /** - * Required. The [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] for revoking this certificate. + * Required. The RevocationReason google.cloud.security.privateca.v1.RevocationReason for revoking this certificate. */ - // const reason = '' + // const reason = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -51,7 +51,7 @@ function main(name, reason) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function revokeCertificate() { + async function callRevokeCertificate() { // Construct request const request = { name, @@ -63,7 +63,7 @@ function main(name, reason) { console.log(response); } - revokeCertificate(); + callRevokeCertificate(); // [END privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js index ce3eb3d68d3..cdcdeb85c57 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority in the * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function undeleteCertificateAuthority() { + async function callUndeleteCertificateAuthority() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - undeleteCertificateAuthority(); + callUndeleteCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js index 7e327af60b0..d0c3c69217a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js @@ -20,13 +20,13 @@ function main(caPool, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [CaPool][google.cloud.security.privateca.v1.CaPool] with updated values. + * Required. CaPool google.cloud.security.privateca.v1.CaPool with updated values. */ - // const caPool = '' + // const caPool = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(caPool, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCaPool() { + async function callUpdateCaPool() { // Construct request const request = { caPool, @@ -62,7 +62,7 @@ function main(caPool, updateMask) { console.log(response); } - updateCaPool(); + callUpdateCaPool(); // [END privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js index 69057977cb7..c33169963d7 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js @@ -20,13 +20,13 @@ function main(certificate, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [Certificate][google.cloud.security.privateca.v1.Certificate] with updated values. + * Required. Certificate google.cloud.security.privateca.v1.Certificate with updated values. */ - // const certificate = '' + // const certificate = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificate, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificate() { + async function callUpdateCertificate() { // Construct request const request = { certificate, @@ -61,7 +61,7 @@ function main(certificate, updateMask) { console.log(response); } - updateCertificate(); + callUpdateCertificate(); // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js index 6a17b82cf98..53c93df032a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js @@ -20,13 +20,13 @@ function main(certificateAuthority, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] with updated values. + * Required. CertificateAuthority google.cloud.security.privateca.v1.CertificateAuthority with updated values. */ - // const certificateAuthority = '' + // const certificateAuthority = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificateAuthority, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificateAuthority() { + async function callUpdateCertificateAuthority() { // Construct request const request = { certificateAuthority, @@ -64,7 +64,7 @@ function main(certificateAuthority, updateMask) { console.log(response); } - updateCertificateAuthority(); + callUpdateCertificateAuthority(); // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js index 4c4a1093d69..f6709783b56 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js @@ -20,13 +20,13 @@ function main(certificateRevocationList, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] with updated values. + * Required. CertificateRevocationList google.cloud.security.privateca.v1.CertificateRevocationList with updated values. */ - // const certificateRevocationList = '' + // const certificateRevocationList = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificateRevocationList, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificateRevocationList() { + async function callUpdateCertificateRevocationList() { // Construct request const request = { certificateRevocationList, @@ -64,7 +64,7 @@ function main(certificateRevocationList, updateMask) { console.log(response); } - updateCertificateRevocationList(); + callUpdateCertificateRevocationList(); // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js index 4b405388825..c8259e45370 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js @@ -20,13 +20,13 @@ function main(certificateTemplate, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with updated values. + * Required. CertificateTemplate google.cloud.security.privateca.v1.CertificateTemplate with updated values. */ - // const certificateTemplate = '' + // const certificateTemplate = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificateTemplate, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificateTemplate() { + async function callUpdateCertificateTemplate() { // Construct request const request = { certificateTemplate, @@ -64,7 +64,7 @@ function main(certificateTemplate, updateMask) { console.log(response); } - updateCertificateTemplate(); + callUpdateCertificateTemplate(); // [END privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js index ea09e603f3e..5736d2b9174 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js @@ -20,20 +20,20 @@ function main(name, pemCaCertificate, subordinateConfig) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the * format `projects/* /locations/* /certificateAuthorities/*`. */ // const name = 'abc123' /** * Required. The signed CA certificate issued from - * [FetchCertificateAuthorityCsrResponse.pem_csr][google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr]. + * FetchCertificateAuthorityCsrResponse.pem_csr google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse.pem_csr. */ // const pemCaCertificate = 'abc123' /** * Required. Must include information about the issuer of 'pem_ca_certificate', and any * further issuers until the self-signed CA. */ - // const subordinateConfig = '' + // const subordinateConfig = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -56,7 +56,7 @@ function main(name, pemCaCertificate, subordinateConfig) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function activateCertificateAuthority() { + async function callActivateCertificateAuthority() { // Construct request const request = { name, @@ -72,7 +72,7 @@ function main(name, pemCaCertificate, subordinateConfig) { console.log(response); } - activateCertificateAuthority(); + callActivateCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js index 6c3e1ed52c7..187069f2022 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js @@ -20,22 +20,22 @@ function main(parent, certificate) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the location and [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] - * associated with the [Certificate][google.cloud.security.privateca.v1beta1.Certificate], in the format + * Required. The resource name of the location and CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority + * associated with the Certificate google.cloud.security.privateca.v1beta1.Certificate, in the format * `projects/* /locations/* /certificateAuthorities/*`. */ // const parent = 'abc123' /** * Optional. It must be unique within a location and match the regular * expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a - * [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the Enterprise [CertificateAuthority.Tier][google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier], + * CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the Enterprise CertificateAuthority.Tier google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier, * but is optional and its value is ignored otherwise. */ // const certificateId = 'abc123' /** - * Required. A [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with initial field values. + * Required. A Certificate google.cloud.security.privateca.v1beta1.Certificate with initial field values. */ - // const certificate = '' + // const certificate = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -58,7 +58,7 @@ function main(parent, certificate) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function createCertificate() { + async function callCreateCertificate() { // Construct request const request = { parent, @@ -70,7 +70,7 @@ function main(parent, certificate) { console.log(response); } - createCertificate(); + callCreateCertificate(); // [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js index 03110919f9b..3b385cbe645 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js @@ -21,7 +21,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { */ /** * Required. The resource name of the location associated with the - * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + * CertificateAuthorities google.cloud.security.privateca.v1beta1.CertificateAuthority, in the format * `projects/* /locations/*`. */ // const parent = 'abc123' @@ -31,9 +31,9 @@ function main(parent, certificateAuthorityId, certificateAuthority) { */ // const certificateAuthorityId = 'abc123' /** - * Required. A [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with initial field values. + * Required. A CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority with initial field values. */ - // const certificateAuthority = '' + // const certificateAuthority = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -56,7 +56,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function createCertificateAuthority() { + async function callCreateCertificateAuthority() { // Construct request const request = { parent, @@ -72,7 +72,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { console.log(response); } - createCertificateAuthority(); + callCreateCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js index 651f5b7f332..b5bb0dd8b9c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the * format `projects/* /locations/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function disableCertificateAuthority() { + async function callDisableCertificateAuthority() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - disableCertificateAuthority(); + callDisableCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js index 672887f0d77..b33f9097bbf 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the * format `projects/* /locations/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function enableCertificateAuthority() { + async function callEnableCertificateAuthority() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - enableCertificateAuthority(); + callEnableCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js index f5739005fb0..03be2130011 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the * format `projects/* /locations/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function fetchCertificateAuthorityCsr() { + async function callFetchCertificateAuthorityCsr() { // Construct request const request = { name, @@ -45,7 +45,7 @@ function main(name) { console.log(response); } - fetchCertificateAuthorityCsr(); + callFetchCertificateAuthorityCsr(); // [END privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js index dd272d99cd9..46b907223fd 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1beta1.Certificate.name] of the [Certificate][google.cloud.security.privateca.v1beta1.Certificate] to get. + * Required. The name google.cloud.security.privateca.v1beta1.Certificate.name of the Certificate google.cloud.security.privateca.v1beta1.Certificate to get. */ // const name = 'abc123' @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificate() { + async function callGetCertificate() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getCertificate(); + callGetCertificate(); // [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js index 21b01a4bfbf..71a9d8b5110 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateAuthority.name] of the [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + * Required. The name google.cloud.security.privateca.v1beta1.CertificateAuthority.name of the CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority to * get. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificateAuthority() { + async function callGetCertificateAuthority() { // Construct request const request = { name, @@ -43,7 +43,7 @@ function main(name) { console.log(response); } - getCertificateAuthority(); + callGetCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js index 87159b06133..4da0748cfa0 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js @@ -20,8 +20,8 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][google.cloud.security.privateca.v1beta1.CertificateRevocationList.name] of the - * [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to get. + * Required. The name google.cloud.security.privateca.v1beta1.CertificateRevocationList.name of the + * CertificateRevocationList google.cloud.security.privateca.v1beta1.CertificateRevocationList to get. */ // const name = 'abc123' @@ -32,7 +32,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getCertificateRevocationList() { + async function callGetCertificateRevocationList() { // Construct request const request = { name, @@ -45,7 +45,7 @@ function main(name) { console.log(response); } - getCertificateRevocationList(); + callGetCertificateRevocationList(); // [END privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js index 233dc45db41..b056d529c3f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The [name][ReusableConfigs.name] of the [ReusableConfigs][] to get. + * Required. The name ReusableConfigs.name of the ReusableConfigs to get. */ // const name = 'abc123' @@ -31,7 +31,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function getReusableConfig() { + async function callGetReusableConfig() { // Construct request const request = { name, @@ -42,7 +42,7 @@ function main(name) { console.log(response); } - getReusableConfig(); + callGetReusableConfig(); // [END privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js index ff1e7b04d1b..5e999432c15 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js @@ -21,22 +21,22 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority], in the format + * CertificateAuthorities google.cloud.security.privateca.v1beta1.CertificateAuthority, in the format * `projects/* /locations/*`. */ // const parent = 'abc123' /** - * Optional. Limit on the number of [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] to + * Optional. Limit on the number of CertificateAuthorities google.cloud.security.privateca.v1beta1.CertificateAuthority to * include in the response. - * Further [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority] can subsequently be + * Further CertificateAuthorities google.cloud.security.privateca.v1beta1.CertificateAuthority can subsequently be * obtained by including the - * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token] in a subsequent + * ListCertificateAuthoritiesResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificateAuthoritiesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token]. + * ListCertificateAuthoritiesResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificateAuthorities() { + async function callListCertificateAuthorities() { // Construct request const request = { parent, @@ -70,7 +70,7 @@ function main(parent) { } } - listCertificateAuthorities(); + callListCertificateAuthorities(); // [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js index b16b97a9867..0e9360dc00e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js @@ -21,22 +21,22 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList], in the format + * CertificateRevocationLists google.cloud.security.privateca.v1beta1.CertificateRevocationList, in the format * `projects/* /locations/* /certificateauthorities/*`. */ // const parent = 'abc123' /** * Optional. Limit on the number of - * [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] to include in the - * response. Further [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList] + * CertificateRevocationLists google.cloud.security.privateca.v1beta1.CertificateRevocationList to include in the + * response. Further CertificateRevocationLists google.cloud.security.privateca.v1beta1.CertificateRevocationList * can subsequently be obtained by including the - * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token] in a subsequent + * ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificateRevocationListsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token]. + * ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificateRevocationLists() { + async function callListCertificateRevocationLists() { // Construct request const request = { parent, @@ -70,7 +70,7 @@ function main(parent) { } } - listCertificateRevocationLists(); + callListCertificateRevocationLists(); // [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js index 48b94181311..dcbef72f8ea 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js @@ -21,34 +21,34 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [Certificates][google.cloud.security.privateca.v1beta1.Certificate], in the format + * Certificates google.cloud.security.privateca.v1beta1.Certificate, in the format * `projects/* /locations/* /certificateauthorities/*`. */ // const parent = 'abc123' /** * Optional. Limit on the number of - * [Certificates][google.cloud.security.privateca.v1beta1.Certificate] to include in the - * response. Further [Certificates][google.cloud.security.privateca.v1beta1.Certificate] can subsequently be obtained + * Certificates google.cloud.security.privateca.v1beta1.Certificate to include in the + * response. Further Certificates google.cloud.security.privateca.v1beta1.Certificate can subsequently be obtained * by including the - * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token] in a subsequent + * ListCertificatesResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListCertificatesResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token]. + * ListCertificatesResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificatesResponse.next_page_token. */ // const pageToken = 'abc123' /** * Optional. Only include resources that match the filter in the response. For details - * on supported filters and syntax, see [Certificates Filtering - * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). + * on supported filters and syntax, see Certificates Filtering + * documentation (https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support). */ // const filter = 'abc123' /** * Optional. Specify how the results should be sorted. For details on supported fields - * and syntax, see [Certificates Sorting - * documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). + * and syntax, see Certificates Sorting + * documentation (https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support). */ // const orderBy = 'abc123' @@ -59,7 +59,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listCertificates() { + async function callListCertificates() { // Construct request const request = { parent, @@ -72,7 +72,7 @@ function main(parent) { } } - listCertificates(); + callListCertificates(); // [END privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js index 8b0af8bd411..1511beb0bfd 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js @@ -21,22 +21,22 @@ function main(parent) { */ /** * Required. The resource name of the location associated with the - * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig], in the format + * ReusableConfigs google.cloud.security.privateca.v1beta1.ReusableConfig, in the format * `projects/* /locations/*`. */ // const parent = 'abc123' /** * Optional. Limit on the number of - * [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] to include in the response. - * Further [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig] can subsequently be + * ReusableConfigs google.cloud.security.privateca.v1beta1.ReusableConfig to include in the response. + * Further ReusableConfigs google.cloud.security.privateca.v1beta1.ReusableConfig can subsequently be * obtained by including the - * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token] in a subsequent request. If + * ListReusableConfigsResponse.next_page_token google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token in a subsequent request. If * unspecified, the server will pick an appropriate default. */ // const pageSize = 1234 /** * Optional. Pagination token, returned earlier via - * [ListReusableConfigsResponse.next_page_token][google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token]. + * ListReusableConfigsResponse.next_page_token google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse.next_page_token. */ // const pageToken = 'abc123' /** @@ -55,7 +55,7 @@ function main(parent) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function listReusableConfigs() { + async function callListReusableConfigs() { // Construct request const request = { parent, @@ -68,7 +68,7 @@ function main(parent) { } } - listReusableConfigs(); + callListReusableConfigs(); // [END privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js index f5199f8aaae..f102c0bf589 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the * format `projects/* /locations/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function restoreCertificateAuthority() { + async function callRestoreCertificateAuthority() { // Construct request const request = { name, @@ -60,7 +60,7 @@ function main(name) { console.log(response); } - restoreCertificateAuthority(); + callRestoreCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js index 704aa2b45c5..a81d4f7523b 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js @@ -20,14 +20,14 @@ function main(name, reason) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in the + * Required. The resource name for this Certificate google.cloud.security.privateca.v1beta1.Certificate in the * format `projects/* /locations/* /certificateAuthorities/* /certificates/*`. */ // const name = 'abc123' /** - * Required. The [RevocationReason][google.cloud.security.privateca.v1beta1.RevocationReason] for revoking this certificate. + * Required. The RevocationReason google.cloud.security.privateca.v1beta1.RevocationReason for revoking this certificate. */ - // const reason = '' + // const reason = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -50,7 +50,7 @@ function main(name, reason) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function revokeCertificate() { + async function callRevokeCertificate() { // Construct request const request = { name, @@ -62,7 +62,7 @@ function main(name, reason) { console.log(response); } - revokeCertificate(); + callRevokeCertificate(); // [END privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js index c4c2c3b8a9b..a27f19f36a8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js @@ -20,7 +20,7 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in the + * Required. The resource name for this CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority in the * format `projects/* /locations/* /certificateAuthorities/*`. */ // const name = 'abc123' @@ -46,7 +46,7 @@ function main(name) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function scheduleDeleteCertificateAuthority() { + async function callScheduleDeleteCertificateAuthority() { // Construct request const request = { name, @@ -59,7 +59,7 @@ function main(name) { console.log(response); } - scheduleDeleteCertificateAuthority(); + callScheduleDeleteCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js index 868bcd71321..1996d88dece 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js @@ -20,13 +20,13 @@ function main(certificate, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [Certificate][google.cloud.security.privateca.v1beta1.Certificate] with updated values. + * Required. Certificate google.cloud.security.privateca.v1beta1.Certificate with updated values. */ - // const certificate = '' + // const certificate = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificate, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificate() { + async function callUpdateCertificate() { // Construct request const request = { certificate, @@ -61,7 +61,7 @@ function main(certificate, updateMask) { console.log(response); } - updateCertificate(); + callUpdateCertificate(); // [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js index 5c55a8ec8ea..eacf2fadf26 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js @@ -20,13 +20,13 @@ function main(certificateAuthority, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] with updated values. + * Required. CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority with updated values. */ - // const certificateAuthority = '' + // const certificateAuthority = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificateAuthority, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificateAuthority() { + async function callUpdateCertificateAuthority() { // Construct request const request = { certificateAuthority, @@ -64,7 +64,7 @@ function main(certificateAuthority, updateMask) { console.log(response); } - updateCertificateAuthority(); + callUpdateCertificateAuthority(); // [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async] } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js index 3a58b9f8044..51f951f4e8d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js @@ -20,13 +20,13 @@ function main(certificateRevocationList, updateMask) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList] with updated values. + * Required. CertificateRevocationList google.cloud.security.privateca.v1beta1.CertificateRevocationList with updated values. */ - // const certificateRevocationList = '' + // const certificateRevocationList = {} /** * Required. A list of fields to be updated in this request. */ - // const updateMask = '' + // const updateMask = {} /** * Optional. An ID to identify requests. Specify a unique request ID so that if you must * retry your request, the server will know to ignore the request if it has @@ -49,7 +49,7 @@ function main(certificateRevocationList, updateMask) { // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); - async function updateCertificateRevocationList() { + async function callUpdateCertificateRevocationList() { // Construct request const request = { certificateRevocationList, @@ -64,7 +64,7 @@ function main(certificateRevocationList, updateMask) { console.log(response); } - updateCertificateRevocationList(); + callUpdateCertificateRevocationList(); // [END privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async] } diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 69e3217f6ad..6ed86777749 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -608,40 +608,6 @@ export class CertificateAuthorityServiceClient { // ------------------- // -- Service calls -- // ------------------- - createCertificate( - request?: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1.ICertificate, - ( - | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest - | undefined - ), - {} | undefined - ] - >; - createCertificate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.security.privateca.v1.ICertificate, - | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createCertificate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, - callback: Callback< - protos.google.cloud.security.privateca.v1.ICertificate, - | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest - | null - | undefined, - {} | null | undefined - > - ): void; /** * Create a new {@link google.cloud.security.privateca.v1.Certificate|Certificate} in a given Project, Location from a particular * {@link google.cloud.security.privateca.v1.CaPool|CaPool}. @@ -695,9 +661,43 @@ export class CertificateAuthorityServiceClient { * 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.createCertificate(request); + * @example include:samples/generated/v1/certificate_authority_service.create_certificate.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async */ + createCertificate( + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | undefined + ), + {} | undefined + ] + >; + createCertificate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCertificate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1.ICertificate, + | protos.google.cloud.security.privateca.v1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; createCertificate( request?: protos.google.cloud.security.privateca.v1.ICreateCertificateRequest, optionsOrCallback?: @@ -744,6 +744,23 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.createCertificate(request, options, callback); } + /** + * Returns a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.Certificate.name|name} of the {@link google.cloud.security.privateca.v1.Certificate|Certificate} to get. + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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/certificate_authority_service.get_certificate.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_GetCertificate_async + */ getCertificate( request?: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, options?: CallOptions @@ -778,23 +795,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.Certificate.name|name} of the {@link google.cloud.security.privateca.v1.Certificate|Certificate} to get. - * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. - * 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.getCertificate(request); - */ getCertificate( request?: protos.google.cloud.security.privateca.v1.IGetCertificateRequest, optionsOrCallback?: @@ -841,6 +841,41 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.getCertificate(request, options, callback); } + /** + * Revoke a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.Certificate|Certificate} in the + * format + * `projects/* /locations/* /caPools/* /certificates/*`. + * @param {google.cloud.security.privateca.v1.RevocationReason} request.reason + * Required. The {@link google.cloud.security.privateca.v1.RevocationReason|RevocationReason} for revoking this certificate. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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/certificate_authority_service.revoke_certificate.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async + */ revokeCertificate( request?: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, options?: CallOptions @@ -875,41 +910,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Revoke a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.Certificate|Certificate} in the - * format - * `projects/* /locations/* /caPools/* /certificates/*`. - * @param {google.cloud.security.privateca.v1.RevocationReason} request.reason - * Required. The {@link google.cloud.security.privateca.v1.RevocationReason|RevocationReason} for revoking this certificate. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. - * 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.revokeCertificate(request); - */ revokeCertificate( request?: protos.google.cloud.security.privateca.v1.IRevokeCertificateRequest, optionsOrCallback?: @@ -956,6 +956,40 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.revokeCertificate(request, options, callback); } + /** + * Update a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. Currently, the only field you can update is the + * {@link google.cloud.security.privateca.v1.Certificate.labels|labels} field. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.Certificate} request.certificate + * Required. {@link google.cloud.security.privateca.v1.Certificate|Certificate} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. + * 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/certificate_authority_service.update_certificate.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async + */ updateCertificate( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, options?: CallOptions @@ -990,40 +1024,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1.Certificate|Certificate}. Currently, the only field you can update is the - * {@link google.cloud.security.privateca.v1.Certificate.labels|labels} field. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1.Certificate} request.certificate - * Required. {@link google.cloud.security.privateca.v1.Certificate|Certificate} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Certificate]{@link google.cloud.security.privateca.v1.Certificate}. - * 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.updateCertificate(request); - */ updateCertificate( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRequest, optionsOrCallback?: @@ -1070,6 +1070,30 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.updateCertificate(request, options, callback); } + /** + * Fetch a certificate signing request (CSR) from a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * that is in state + * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} + * and is of type {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. The + * CSR must then be signed by the desired parent Certificate Authority, which + * could be another {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} resource, or could be an on-prem + * certificate authority. See also {@link google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse}. + * 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/certificate_authority_service.fetch_certificate_authority_csr.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async + */ fetchCertificateAuthorityCsr( request?: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, options?: CallOptions @@ -1104,30 +1128,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Fetch a certificate signing request (CSR) from a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * that is in state - * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} - * and is of type {@link google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. The - * CSR must then be signed by the desired parent Certificate Authority, which - * could be another {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} resource, or could be an on-prem - * certificate authority. See also {@link google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. - * @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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse}. - * 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.fetchCertificateAuthorityCsr(request); - */ fetchCertificateAuthorityCsr( request?: protos.google.cloud.security.privateca.v1.IFetchCertificateAuthorityCsrRequest, optionsOrCallback?: @@ -1178,6 +1178,24 @@ export class CertificateAuthorityServiceClient { callback ); } + /** + * Returns a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.CertificateAuthority.name|name} of the {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} to + * get. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1.CertificateAuthority}. + * 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/certificate_authority_service.get_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async + */ getCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, options?: CallOptions @@ -1212,24 +1230,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.CertificateAuthority.name|name} of the {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} to - * get. - * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1.CertificateAuthority}. - * 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.getCertificateAuthority(request); - */ getCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IGetCertificateAuthorityRequest, optionsOrCallback?: @@ -1280,6 +1280,23 @@ export class CertificateAuthorityServiceClient { callback ); } + /** + * Returns a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.CaPool.name|name} of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} to get. + * @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 [CaPool]{@link google.cloud.security.privateca.v1.CaPool}. + * 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/certificate_authority_service.get_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_GetCaPool_async + */ getCaPool( request?: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, options?: CallOptions @@ -1311,23 +1328,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.CaPool.name|name} of the {@link google.cloud.security.privateca.v1.CaPool|CaPool} to get. - * @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 [CaPool]{@link google.cloud.security.privateca.v1.CaPool}. - * 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.getCaPool(request); - */ getCaPool( request?: protos.google.cloud.security.privateca.v1.IGetCaPoolRequest, optionsOrCallback?: @@ -1371,6 +1371,40 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.getCaPool(request, options, callback); } + /** + * FetchCaCerts returns the current trust anchor for the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. This will + * include CA certificate chains for all ACTIVE {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} + * resources in the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.caPool + * Required. The resource name for the {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the + * format `projects/* /locations/* /caPools/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [FetchCaCertsResponse]{@link google.cloud.security.privateca.v1.FetchCaCertsResponse}. + * 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/certificate_authority_service.fetch_ca_certs.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async + */ fetchCaCerts( request?: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, options?: CallOptions @@ -1405,40 +1439,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * FetchCaCerts returns the current trust anchor for the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. This will - * include CA certificate chains for all ACTIVE {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} - * resources in the {@link google.cloud.security.privateca.v1.CaPool|CaPool}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.caPool - * Required. The resource name for the {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the - * format `projects/* /locations/* /caPools/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [FetchCaCertsResponse]{@link google.cloud.security.privateca.v1.FetchCaCertsResponse}. - * 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.fetchCaCerts(request); - */ fetchCaCerts( request?: protos.google.cloud.security.privateca.v1.IFetchCaCertsRequest, optionsOrCallback?: @@ -1485,6 +1485,24 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.fetchCaCerts(request, options, callback); } + /** + * Returns a {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.CertificateRevocationList.name|name} of the + * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} to get. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1.CertificateRevocationList}. + * 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/certificate_authority_service.get_certificate_revocation_list.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async + */ getCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, options?: CallOptions @@ -1519,24 +1537,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.CertificateRevocationList.name|name} of the - * {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} to get. - * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1.CertificateRevocationList}. - * 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.getCertificateRevocationList(request); - */ getCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1.IGetCertificateRevocationListRequest, optionsOrCallback?: @@ -1587,6 +1587,24 @@ export class CertificateAuthorityServiceClient { callback ); } + /** + * Returns a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1.CertificateTemplate.name|name} of the {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} to + * get. + * @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 [CertificateTemplate]{@link google.cloud.security.privateca.v1.CertificateTemplate}. + * 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/certificate_authority_service.get_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async + */ getCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, options?: CallOptions @@ -1621,24 +1639,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1.CertificateTemplate.name|name} of the {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} to - * get. - * @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 [CertificateTemplate]{@link google.cloud.security.privateca.v1.CertificateTemplate}. - * 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.getCertificateTemplate(request); - */ getCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.IGetCertificateTemplateRequest, optionsOrCallback?: @@ -1690,42 +1690,6 @@ export class CertificateAuthorityServiceClient { ); } - activateCertificateAuthority( - request?: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Activate a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} that is in state * {@link google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION|AWAITING_USER_ACTIVATION} @@ -1768,10 +1732,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.activateCertificateAuthority(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/certificate_authority_service.activate_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async */ + activateCertificateAuthority( + request?: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; activateCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IActivateCertificateAuthorityRequest, optionsOrCallback?: @@ -1833,11 +1832,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkActivateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.activate_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async */ async checkActivateCertificateAuthorityProgress( name: string @@ -1861,42 +1857,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } - createCertificateAuthority( - request?: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Create a new {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in a given Project and Location. * @@ -1934,10 +1894,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createCertificateAuthority(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/certificate_authority_service.create_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async */ + createCertificateAuthority( + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.ICreateCertificateAuthorityRequest, optionsOrCallback?: @@ -1999,11 +1994,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.create_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async */ async checkCreateCertificateAuthorityProgress( name: string @@ -2027,6 +2019,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Disable a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.disable_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async + */ disableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, options?: CallOptions @@ -2063,41 +2089,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Disable a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.disableCertificateAuthority(request); - * const [response] = await operation.promise(); - */ disableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IDisableCertificateAuthorityRequest, optionsOrCallback?: @@ -2159,11 +2150,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDisableCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.disable_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async */ async checkDisableCertificateAuthorityProgress( name: string @@ -2187,6 +2175,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Enable a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.enable_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async + */ enableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, options?: CallOptions @@ -2223,41 +2245,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Enable a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.enableCertificateAuthority(request); - * const [response] = await operation.promise(); - */ enableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IEnableCertificateAuthorityRequest, optionsOrCallback?: @@ -2319,11 +2306,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkEnableCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.enable_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async */ async checkEnableCertificateAuthorityProgress( name: string @@ -2347,42 +2331,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } - undeleteCertificateAuthority( - request?: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - undeleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - undeleteCertificateAuthority( - request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Undelete a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} that has been deleted. * @@ -2414,10 +2362,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.undeleteCertificateAuthority(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async */ + undeleteCertificateAuthority( + request?: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + undeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + undeleteCertificateAuthority( + request: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; undeleteCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IUndeleteCertificateAuthorityRequest, optionsOrCallback?: @@ -2479,11 +2462,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUndeleteCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async */ async checkUndeleteCertificateAuthorityProgress( name: string @@ -2507,6 +2487,43 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Delete a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.ignoreActiveCertificates] + * Optional. This field allows the CA to be deleted even if the CA has + * active certs. Active certs include both unrevoked and unexpired certs. + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.delete_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async + */ deleteCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, options?: CallOptions @@ -2543,44 +2560,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Delete a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /caPools/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.ignoreActiveCertificates] - * Optional. This field allows the CA to be deleted even if the CA has - * active certs. Active certs include both unrevoked and unexpired certs. - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteCertificateAuthority(request); - * const [response] = await operation.promise(); - */ deleteCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateAuthorityRequest, optionsOrCallback?: @@ -2642,11 +2621,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.delete_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async */ async checkDeleteCertificateAuthorityProgress( name: string @@ -2670,6 +2646,41 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Update a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CertificateAuthority} request.certificateAuthority + * Required. {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.update_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async + */ updateCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, options?: CallOptions @@ -2706,42 +2717,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1.CertificateAuthority} request.certificateAuthority - * Required. {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthority} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateCertificateAuthority(request); - * const [response] = await operation.promise(); - */ updateCertificateAuthority( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateAuthorityRequest, optionsOrCallback?: @@ -2803,11 +2778,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.update_certificate_authority.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async */ async checkUpdateCertificateAuthorityProgress( name: string @@ -2831,42 +2803,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } - createCaPool( - request?: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createCaPool( - request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createCaPool( - request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICaPool, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Create a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. * @@ -2903,10 +2839,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createCaPool(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/certificate_authority_service.create_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async */ + createCaPool( + request?: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCaPool( + request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCaPool( + request: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICaPool, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createCaPool( request?: protos.google.cloud.security.privateca.v1.ICreateCaPoolRequest, optionsOrCallback?: @@ -2964,11 +2935,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateCaPoolProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.create_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async */ async checkCreateCaPoolProgress( name: string @@ -2992,6 +2960,41 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Update a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CaPool} request.caPool + * Required. {@link google.cloud.security.privateca.v1.CaPool|CaPool} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.update_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async + */ updateCaPool( request?: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, options?: CallOptions @@ -3028,42 +3031,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1.CaPool} request.caPool - * Required. {@link google.cloud.security.privateca.v1.CaPool|CaPool} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateCaPool(request); - * const [response] = await operation.promise(); - */ updateCaPool( request?: protos.google.cloud.security.privateca.v1.IUpdateCaPoolRequest, optionsOrCallback?: @@ -3121,11 +3088,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCaPoolProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.update_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async */ async checkUpdateCaPoolProgress( name: string @@ -3149,6 +3113,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Delete a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the + * format `projects/* /locations/* /caPools/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.delete_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async + */ deleteCaPool( request?: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, options?: CallOptions @@ -3185,41 +3183,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Delete a {@link google.cloud.security.privateca.v1.CaPool|CaPool}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.CaPool|CaPool} in the - * format `projects/* /locations/* /caPools/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteCaPool(request); - * const [response] = await operation.promise(); - */ deleteCaPool( request?: protos.google.cloud.security.privateca.v1.IDeleteCaPoolRequest, optionsOrCallback?: @@ -3277,11 +3240,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteCaPoolProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.delete_ca_pool.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async */ async checkDeleteCaPoolProgress( name: string @@ -3305,6 +3265,41 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Update a {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CertificateRevocationList} request.certificateRevocationList + * Required. {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async + */ updateCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, options?: CallOptions @@ -3341,42 +3336,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1.CertificateRevocationList} request.certificateRevocationList - * Required. {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationList} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateCertificateRevocationList(request); - * const [response] = await operation.promise(); - */ updateCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateRevocationListRequest, optionsOrCallback?: @@ -3439,11 +3398,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async */ async checkUpdateCertificateRevocationListProgress( name: string @@ -3467,42 +3423,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } - createCertificateTemplate( - request?: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateTemplate, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateTemplate, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createCertificateTemplate( - request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1.ICertificateTemplate, - protos.google.cloud.security.privateca.v1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Create a new {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} in a given Project and Location. * @@ -3540,10 +3460,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createCertificateTemplate(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1/certificate_authority_service.create_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async */ + createCertificateTemplate( + request?: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateTemplate( + request: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1.ICertificateTemplate, + protos.google.cloud.security.privateca.v1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.ICreateCertificateTemplateRequest, optionsOrCallback?: @@ -3605,11 +3560,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateCertificateTemplateProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.create_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async */ async checkCreateCertificateTemplateProgress( name: string @@ -3633,6 +3585,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * DeleteCertificateTemplate deletes a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} in the format + * `projects/* /locations/* /certificateTemplates/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.delete_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async + */ deleteCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, options?: CallOptions @@ -3669,41 +3655,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * DeleteCertificateTemplate deletes a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} in the format - * `projects/* /locations/* /certificateTemplates/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.deleteCertificateTemplate(request); - * const [response] = await operation.promise(); - */ deleteCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.IDeleteCertificateTemplateRequest, optionsOrCallback?: @@ -3765,11 +3716,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDeleteCertificateTemplateProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.delete_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async */ async checkDeleteCertificateTemplateProgress( name: string @@ -3793,6 +3741,41 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } + /** + * Update a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1.CertificateTemplate} request.certificateTemplate + * Required. {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/certificate_authority_service.update_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async + */ updateCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, options?: CallOptions @@ -3829,42 +3812,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1.CertificateTemplate} request.certificateTemplate - * Required. {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplate} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateCertificateTemplate(request); - * const [response] = await operation.promise(); - */ updateCertificateTemplate( request?: protos.google.cloud.security.privateca.v1.IUpdateCertificateTemplateRequest, optionsOrCallback?: @@ -3926,11 +3873,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCertificateTemplateProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1/certificate_authority_service.update_certificate_template.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async */ async checkUpdateCertificateTemplateProgress( name: string @@ -3954,37 +3898,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata >; } - listCertificates( - request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1.ICertificate[], - protos.google.cloud.security.privateca.v1.IListCertificatesRequest | null, - protos.google.cloud.security.privateca.v1.IListCertificatesResponse - ] - >; - listCertificates( - request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificate - > - ): void; - listCertificates( - request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificate - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1.Certificate|Certificates}. * @@ -4025,6 +3938,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificates( + request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificate[], + protos.google.cloud.security.privateca.v1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificatesResponse + ] + >; + listCertificates( + request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificate + > + ): void; + listCertificates( + request: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificate + > + ): void; listCertificates( request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, optionsOrCallback?: @@ -4167,65 +4111,30 @@ export class CertificateAuthorityServiceClient { * 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.listCertificatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/certificate_authority_service.list_certificates.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ListCertificates_async */ listCertificatesAsync( request?: protos.google.cloud.security.privateca.v1.IListCertificatesRequest, - 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 defaultCallSettings = this._defaults['listCertificates']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listCertificates.asyncIterate( - this.innerApiCalls['listCertificates'] as GaxCall, - request as unknown as RequestType, - callSettings - ) as AsyncIterable; - } - listCertificateAuthorities( - request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1.ICertificateAuthority[], - protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest | null, - protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse - ] - >; - listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, - | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificateAuthority - > - ): void; - listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, - | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificateAuthority - > - ): void; + 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['listCertificates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCertificates.asyncIterate( + this.innerApiCalls['listCertificates'] as GaxCall, + request as unknown as RequestType, + callSettings + ) as AsyncIterable; + } /** * Lists {@link google.cloud.security.privateca.v1.CertificateAuthority|CertificateAuthorities}. * @@ -4262,6 +4171,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificateAuthorities( + request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateAuthority[], + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + ] + >; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateAuthority + > + ): void; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateAuthority + > + ): void; listCertificateAuthorities( request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, optionsOrCallback?: @@ -4400,11 +4340,8 @@ export class CertificateAuthorityServiceClient { * 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.listCertificateAuthoritiesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/certificate_authority_service.list_certificate_authorities.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async */ listCertificateAuthoritiesAsync( request?: protos.google.cloud.security.privateca.v1.IListCertificateAuthoritiesRequest, @@ -4418,7 +4355,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -4428,37 +4364,6 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } - listCaPools( - request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1.ICaPool[], - protos.google.cloud.security.privateca.v1.IListCaPoolsRequest | null, - protos.google.cloud.security.privateca.v1.IListCaPoolsResponse - ] - >; - listCaPools( - request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, - | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICaPool - > - ): void; - listCaPools( - request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, - | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICaPool - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1.CaPool|CaPools}. * @@ -4495,6 +4400,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCaPools( + request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICaPool[], + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest | null, + protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + ] + >; + listCaPools( + request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICaPool + > + ): void; + listCaPools( + request: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, + | protos.google.cloud.security.privateca.v1.IListCaPoolsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICaPool + > + ): void; listCaPools( request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, optionsOrCallback?: @@ -4629,11 +4565,8 @@ export class CertificateAuthorityServiceClient { * 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.listCaPoolsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/certificate_authority_service.list_ca_pools.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ListCaPools_async */ listCaPoolsAsync( request?: protos.google.cloud.security.privateca.v1.IListCaPoolsRequest, @@ -4647,7 +4580,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCaPools']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -4657,37 +4589,6 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } - listCertificateRevocationLists( - request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1.ICertificateRevocationList[], - protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest | null, - protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse - ] - >; - listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, - | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificateRevocationList - > - ): void; - listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, - | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificateRevocationList - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1.CertificateRevocationList|CertificateRevocationLists}. * @@ -4724,6 +4625,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificateRevocationLists( + request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateRevocationList[], + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + ] + >; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateRevocationList + > + ): void; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateRevocationList + > + ): void; listCertificateRevocationLists( request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, optionsOrCallback?: @@ -4863,11 +4795,8 @@ export class CertificateAuthorityServiceClient { * 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.listCertificateRevocationListsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async */ listCertificateRevocationListsAsync( request?: protos.google.cloud.security.privateca.v1.IListCertificateRevocationListsRequest, @@ -4881,7 +4810,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCertificateRevocationLists']; const callSettings = defaultCallSettings.merge(options); @@ -4892,37 +4820,6 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } - listCertificateTemplates( - request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1.ICertificateTemplate[], - protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest | null, - protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse - ] - >; - listCertificateTemplates( - request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, - | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificateTemplate - > - ): void; - listCertificateTemplates( - request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, - | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1.ICertificateTemplate - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1.CertificateTemplate|CertificateTemplates}. * @@ -4959,6 +4856,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificateTemplates( + request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1.ICertificateTemplate[], + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest | null, + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + ] + >; + listCertificateTemplates( + request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateTemplate + > + ): void; + listCertificateTemplates( + request: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, + | protos.google.cloud.security.privateca.v1.IListCertificateTemplatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1.ICertificateTemplate + > + ): void; listCertificateTemplates( request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, optionsOrCallback?: @@ -5097,11 +5025,8 @@ export class CertificateAuthorityServiceClient { * 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.listCertificateTemplatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1/certificate_authority_service.list_certificate_templates.js + * region_tag:privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async */ listCertificateTemplatesAsync( request?: protos.google.cloud.security.privateca.v1.IListCertificateTemplatesRequest, @@ -5115,7 +5040,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCertificateTemplates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -5280,7 +5204,9 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) * for more details and examples. * @example + * ``` * const [response] = await client.getLocation(request); + * ``` */ getLocation( request: LocationProtos.google.cloud.location.IGetLocationRequest, @@ -5329,10 +5255,12 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. * @example + * ``` * const iterable = client.listLocationsAsync(request); * for await (const response of iterable) { * // process response * } + * ``` */ listLocationsAsync( request: LocationProtos.google.cloud.location.IListLocationsRequest, diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index e7774cdef03..eba8e8b2e17 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -505,40 +505,6 @@ export class CertificateAuthorityServiceClient { // ------------------- // -- Service calls -- // ------------------- - createCertificate( - request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.ICertificate, - ( - | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest - | undefined - ), - {} | undefined - ] - >; - createCertificate( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.security.privateca.v1beta1.ICertificate, - | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest - | null - | undefined, - {} | null | undefined - > - ): void; - createCertificate( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, - callback: Callback< - protos.google.cloud.security.privateca.v1beta1.ICertificate, - | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest - | null - | undefined, - {} | null | undefined - > - ): void; /** * Create a new {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} in a given Project, Location from a particular * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. @@ -577,9 +543,43 @@ export class CertificateAuthorityServiceClient { * 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.createCertificate(request); + * @example include:samples/generated/v1beta1/certificate_authority_service.create_certificate.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async */ + createCertificate( + request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate, + ( + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | undefined + ), + {} | undefined + ] + >; + createCertificate( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCertificate( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, + callback: Callback< + protos.google.cloud.security.privateca.v1beta1.ICertificate, + | protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest + | null + | undefined, + {} | null | undefined + > + ): void; createCertificate( request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateRequest, optionsOrCallback?: @@ -626,6 +626,23 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.createCertificate(request, options, callback); } + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1beta1.Certificate.name|name} of the {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} to get. + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * 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/certificate_authority_service.get_certificate.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async + */ getCertificate( request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, options?: CallOptions @@ -660,23 +677,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1beta1.Certificate.name|name} of the {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} to get. - * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.getCertificate(request); - */ getCertificate( request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRequest, optionsOrCallback?: @@ -723,6 +723,40 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.getCertificate(request, options, callback); } + /** + * Revoke a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} in the + * format `projects/* /locations/* /certificateAuthorities/* /certificates/*`. + * @param {google.cloud.security.privateca.v1beta1.RevocationReason} request.reason + * Required. The {@link google.cloud.security.privateca.v1beta1.RevocationReason|RevocationReason} for revoking this certificate. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * 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/certificate_authority_service.revoke_certificate.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async + */ revokeCertificate( request?: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, options?: CallOptions @@ -757,40 +791,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Revoke a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} in the - * format `projects/* /locations/* /certificateAuthorities/* /certificates/*`. - * @param {google.cloud.security.privateca.v1beta1.RevocationReason} request.reason - * Required. The {@link google.cloud.security.privateca.v1beta1.RevocationReason|RevocationReason} for revoking this certificate. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.revokeCertificate(request); - */ revokeCertificate( request?: protos.google.cloud.security.privateca.v1beta1.IRevokeCertificateRequest, optionsOrCallback?: @@ -837,6 +837,40 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.revokeCertificate(request, options, callback); } + /** + * Update a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. Currently, the only field you can update is the + * {@link google.cloud.security.privateca.v1beta1.Certificate.labels|labels} field. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1beta1.Certificate} request.certificate + * Required. {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. + * 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/certificate_authority_service.update_certificate.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async + */ updateCertificate( request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, options?: CallOptions @@ -871,40 +905,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate}. Currently, the only field you can update is the - * {@link google.cloud.security.privateca.v1beta1.Certificate.labels|labels} field. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1beta1.Certificate} request.certificate - * Required. {@link google.cloud.security.privateca.v1beta1.Certificate|Certificate} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 [Certificate]{@link google.cloud.security.privateca.v1beta1.Certificate}. - * 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.updateCertificate(request); - */ updateCertificate( request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRequest, optionsOrCallback?: @@ -951,6 +951,30 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.innerApiCalls.updateCertificate(request, options, callback); } + /** + * Fetch a certificate signing request (CSR) from a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} + * that is in state + * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION|PENDING_ACTIVATION} and is + * of type {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. The CSR must + * then be signed by the desired parent Certificate Authority, which could be + * another {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} resource, or could be an on-prem + * certificate authority. See also {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse}. + * 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/certificate_authority_service.fetch_certificate_authority_csr.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async + */ fetchCertificateAuthorityCsr( request?: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, options?: CallOptions @@ -985,30 +1009,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Fetch a certificate signing request (CSR) from a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} - * that is in state - * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION|PENDING_ACTIVATION} and is - * of type {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE|SUBORDINATE}. The CSR must - * then be signed by the desired parent Certificate Authority, which could be - * another {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} resource, or could be an on-prem - * certificate authority. See also {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority|ActivateCertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /certificateAuthorities/*`. - * @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 [FetchCertificateAuthorityCsrResponse]{@link google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse}. - * 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.fetchCertificateAuthorityCsr(request); - */ fetchCertificateAuthorityCsr( request?: protos.google.cloud.security.privateca.v1beta1.IFetchCertificateAuthorityCsrRequest, optionsOrCallback?: @@ -1059,6 +1059,24 @@ export class CertificateAuthorityServiceClient { callback ); } + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.name|name} of the {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} to + * get. + * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. + * 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/certificate_authority_service.get_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async + */ getCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, options?: CallOptions @@ -1093,24 +1111,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.name|name} of the {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} to - * get. - * @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 [CertificateAuthority]{@link google.cloud.security.privateca.v1beta1.CertificateAuthority}. - * 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.getCertificateAuthority(request); - */ getCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateAuthorityRequest, optionsOrCallback?: @@ -1161,6 +1161,24 @@ export class CertificateAuthorityServiceClient { callback ); } + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.name|name} of the + * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} to get. + * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. + * 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/certificate_authority_service.get_certificate_revocation_list.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async + */ getCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, options?: CallOptions @@ -1195,24 +1213,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList.name|name} of the - * {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList} to get. - * @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 [CertificateRevocationList]{@link google.cloud.security.privateca.v1beta1.CertificateRevocationList}. - * 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.getCertificateRevocationList(request); - */ getCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1beta1.IGetCertificateRevocationListRequest, optionsOrCallback?: @@ -1263,6 +1263,23 @@ export class CertificateAuthorityServiceClient { callback ); } + /** + * Returns a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The {@link ReusableConfigs.name|name} of the {@link |ReusableConfigs} to get. + * @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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. + * 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/certificate_authority_service.get_reusable_config.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async + */ getReusableConfig( request?: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, options?: CallOptions @@ -1297,23 +1314,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Returns a {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfig}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The {@link ReusableConfigs.name|name} of the {@link |ReusableConfigs} to get. - * @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 [ReusableConfig]{@link google.cloud.security.privateca.v1beta1.ReusableConfig}. - * 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.getReusableConfig(request); - */ getReusableConfig( request?: protos.google.cloud.security.privateca.v1beta1.IGetReusableConfigRequest, optionsOrCallback?: @@ -1361,42 +1361,6 @@ export class CertificateAuthorityServiceClient { return this.innerApiCalls.getReusableConfig(request, options, callback); } - activateCertificateAuthority( - request?: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - activateCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Activate a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} that is in state * {@link google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION|PENDING_ACTIVATION} and is @@ -1439,10 +1403,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.activateCertificateAuthority(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async */ + activateCertificateAuthority( + request?: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + activateCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; activateCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IActivateCertificateAuthorityRequest, optionsOrCallback?: @@ -1504,11 +1503,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkActivateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async */ async checkActivateCertificateAuthorityProgress( name: string @@ -1532,42 +1528,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } - createCertificateAuthority( - request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - createCertificateAuthority( - request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Create a new {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in a given Project and Location. * @@ -1605,10 +1565,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.createCertificateAuthority(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async */ + createCertificateAuthority( + request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + createCertificateAuthority( + request: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; createCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.ICreateCertificateAuthorityRequest, optionsOrCallback?: @@ -1670,11 +1665,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkCreateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async */ async checkCreateCertificateAuthorityProgress( name: string @@ -1698,6 +1690,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } + /** + * Disable a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async + */ disableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, options?: CallOptions @@ -1734,41 +1760,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Disable a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.disableCertificateAuthority(request); - * const [response] = await operation.promise(); - */ disableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IDisableCertificateAuthorityRequest, optionsOrCallback?: @@ -1830,11 +1821,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkDisableCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async */ async checkDisableCertificateAuthorityProgress( name: string @@ -1858,6 +1846,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } + /** + * Enable a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async + */ enableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, options?: CallOptions @@ -1894,41 +1916,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Enable a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.enableCertificateAuthority(request); - * const [response] = await operation.promise(); - */ enableCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IEnableCertificateAuthorityRequest, optionsOrCallback?: @@ -1990,34 +1977,65 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkEnableCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async + */ + async checkEnableCertificateAuthorityProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.enableCertificateAuthority, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, + protos.google.cloud.security.privateca.v1beta1.OperationMetadata + >; + } + /** + * Restore a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} that is scheduled for deletion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async */ - async checkEnableCertificateAuthorityProgress( - name: string - ): Promise< - LROperation< - protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - > - > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( - operation, - this.descriptors.longrunning.enableCertificateAuthority, - gax.createDefaultBackoffSettings() - ); - return decodeOperation as LROperation< - protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, - protos.google.cloud.security.privateca.v1beta1.OperationMetadata - >; - } restoreCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, options?: CallOptions @@ -2054,41 +2072,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Restore a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} that is scheduled for deletion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.restoreCertificateAuthority(request); - * const [response] = await operation.promise(); - */ restoreCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IRestoreCertificateAuthorityRequest, optionsOrCallback?: @@ -2150,11 +2133,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkRestoreCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async */ async checkRestoreCertificateAuthorityProgress( name: string @@ -2178,6 +2158,40 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } + /** + * Schedule a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} for deletion. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the + * format `projects/* /locations/* /certificateAuthorities/*`. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async + */ scheduleDeleteCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, options?: CallOptions @@ -2214,41 +2228,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Schedule a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} for deletion. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name for this {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} in the - * format `projects/* /locations/* /certificateAuthorities/*`. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.scheduleDeleteCertificateAuthority(request); - * const [response] = await operation.promise(); - */ scheduleDeleteCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IScheduleDeleteCertificateAuthorityRequest, optionsOrCallback?: @@ -2310,11 +2289,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkScheduleDeleteCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async */ async checkScheduleDeleteCertificateAuthorityProgress( name: string @@ -2338,6 +2314,41 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } + /** + * Update a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} request.certificateAuthority + * Required. {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} with updated values. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A list of fields to be updated in this request. + * @param {string} [request.requestId] + * Optional. An ID to identify requests. Specify a unique request ID so that if you must + * retry your request, the server will know to ignore the request if it has + * already been completed. The server will guarantee that for at least 60 + * minutes since the first request. + * + * For example, consider a situation where you make an initial request and t + * he request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async + */ updateCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, options?: CallOptions @@ -2374,42 +2385,6 @@ export class CertificateAuthorityServiceClient { {} | null | undefined > ): void; - /** - * Update a {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority}. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.security.privateca.v1beta1.CertificateAuthority} request.certificateAuthority - * Required. {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthority} with updated values. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A list of fields to be updated in this request. - * @param {string} [request.requestId] - * Optional. An ID to identify requests. Specify a unique request ID so that if you must - * retry your request, the server will know to ignore the request if it has - * already been completed. The server will guarantee that for at least 60 - * minutes since the first request. - * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @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 - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) - * for more details and examples. - * @example - * const [operation] = await client.updateCertificateAuthority(request); - * const [response] = await operation.promise(); - */ updateCertificateAuthority( request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateAuthorityRequest, optionsOrCallback?: @@ -2471,11 +2446,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCertificateAuthorityProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async */ async checkUpdateCertificateAuthorityProgress( name: string @@ -2499,42 +2471,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } - updateCertificateRevocationList( - request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, - options?: CallOptions - ): Promise< - [ - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | undefined, - {} | undefined - ] - >; - updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, - options: CallOptions, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; - updateCertificateRevocationList( - request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, - callback: Callback< - LROperation< - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, - protos.google.cloud.security.privateca.v1beta1.IOperationMetadata - >, - protos.google.longrunning.IOperation | null | undefined, - {} | null | undefined - > - ): void; /** * Update a {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationList}. * @@ -2567,10 +2503,45 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const [operation] = await client.updateCertificateRevocationList(request); - * const [response] = await operation.promise(); + * @example include:samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async */ + updateCertificateRevocationList( + request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + updateCertificateRevocationList( + request: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, + callback: Callback< + LROperation< + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList, + protos.google.cloud.security.privateca.v1beta1.IOperationMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; updateCertificateRevocationList( request?: protos.google.cloud.security.privateca.v1beta1.IUpdateCertificateRevocationListRequest, optionsOrCallback?: @@ -2633,11 +2604,8 @@ export class CertificateAuthorityServiceClient { * Please see the * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) * for more details and examples. - * @example - * const decodedOperation = await checkUpdateCertificateRevocationListProgress(name); - * console.log(decodedOperation.result); - * console.log(decodedOperation.done); - * console.log(decodedOperation.metadata); + * @example include:samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async */ async checkUpdateCertificateRevocationListProgress( name: string @@ -2661,37 +2629,6 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata >; } - listCertificates( - request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.ICertificate[], - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, - protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - ] - >; - listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificate - > - ): void; - listCertificates( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificate - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1beta1.Certificate|Certificates}. * @@ -2732,6 +2669,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificates( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificate[], + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + ] + >; + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate + > + ): void; + listCertificates( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificatesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificate + > + ): void; listCertificates( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, optionsOrCallback?: @@ -2874,11 +2842,8 @@ export class CertificateAuthorityServiceClient { * 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.listCertificatesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/certificate_authority_service.list_certificates.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async */ listCertificatesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificatesRequest, @@ -2892,7 +2857,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCertificates']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -2902,37 +2866,6 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } - listCertificateAuthorities( - request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[], - protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest | null, - protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse - ] - >; - listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority - > - ): void; - listCertificateAuthorities( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1beta1.CertificateAuthority|CertificateAuthorities}. * @@ -2969,6 +2902,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificateAuthorities( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority[], + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + ] + >; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + > + ): void; + listCertificateAuthorities( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateAuthority + > + ): void; listCertificateAuthorities( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, optionsOrCallback?: @@ -3107,11 +3071,8 @@ export class CertificateAuthorityServiceClient { * 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.listCertificateAuthoritiesAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async */ listCertificateAuthoritiesAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateAuthoritiesRequest, @@ -3125,7 +3086,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); this.initialize(); @@ -3135,37 +3095,6 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } - listCertificateRevocationLists( - request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[], - protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest | null, - protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse - ] - >; - listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList - > - ): void; - listCertificateRevocationLists( - request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, - | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1beta1.CertificateRevocationList|CertificateRevocationLists}. * @@ -3202,6 +3131,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listCertificateRevocationLists( + request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList[], + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + ] + >; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + > + ): void; + listCertificateRevocationLists( + request: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.ICertificateRevocationList + > + ): void; listCertificateRevocationLists( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, optionsOrCallback?: @@ -3341,11 +3301,8 @@ export class CertificateAuthorityServiceClient { * 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.listCertificateRevocationListsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async */ listCertificateRevocationListsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListCertificateRevocationListsRequest, @@ -3359,7 +3316,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listCertificateRevocationLists']; const callSettings = defaultCallSettings.merge(options); @@ -3370,37 +3326,6 @@ export class CertificateAuthorityServiceClient { callSettings ) as AsyncIterable; } - listReusableConfigs( - request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - options?: CallOptions - ): Promise< - [ - protos.google.cloud.security.privateca.v1beta1.IReusableConfig[], - protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest | null, - protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse - ] - >; - listReusableConfigs( - request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.IReusableConfig - > - ): void; - listReusableConfigs( - request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - callback: PaginationCallback< - protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, - | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse - | null - | undefined, - protos.google.cloud.security.privateca.v1beta1.IReusableConfig - > - ): void; /** * Lists {@link google.cloud.security.privateca.v1beta1.ReusableConfig|ReusableConfigs}. * @@ -3437,6 +3362,37 @@ export class CertificateAuthorityServiceClient { * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) * for more details and examples. */ + listReusableConfigs( + request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.security.privateca.v1beta1.IReusableConfig[], + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest | null, + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + ] + >; + listReusableConfigs( + request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + > + ): void; + listReusableConfigs( + request: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + callback: PaginationCallback< + protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, + | protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsResponse + | null + | undefined, + protos.google.cloud.security.privateca.v1beta1.IReusableConfig + > + ): void; listReusableConfigs( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, optionsOrCallback?: @@ -3571,11 +3527,8 @@ export class CertificateAuthorityServiceClient { * 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.listReusableConfigsAsync(request); - * for await (const response of iterable) { - * // process response - * } + * @example include:samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js + * region_tag:privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async */ listReusableConfigsAsync( request?: protos.google.cloud.security.privateca.v1beta1.IListReusableConfigsRequest, @@ -3589,7 +3542,6 @@ export class CertificateAuthorityServiceClient { gax.routingHeader.fromParams({ parent: request.parent || '', }); - options = options || {}; const defaultCallSettings = this._defaults['listReusableConfigs']; const callSettings = defaultCallSettings.merge(options); this.initialize(); From 805d66f8e9ac807a14ce70c7ef142ae57f350e59 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Fri, 26 Nov 2021 10:06:45 -0800 Subject: [PATCH 071/113] feat!: default to v1 of the API (#88) refactor!: v1 removes methods 'restoreCertificateAuthority', 'scheduleDeleteCertificateAuthority', 'getReusableConfig', 'listReusableConfigs' refactor!: resource paths have changed for some methods, e.g., certificateAuthorities becomes caPools Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> Co-authored-by: Benjamin E. Coe Co-authored-by: Jeffrey Rennie --- .../.repo-metadata.json | 4 ++-- packages/google-cloud-security-privateca/README.md | 13 +++++++------ .../samples/quickstart.js | 4 +--- .../google-cloud-security-privateca/src/index.ts | 6 ++---- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 211ed1d0c7c..0ced8fb62d3 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -2,8 +2,8 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/security-private-ca/latest", "api_id": "privateca.googleapis.com", "distribution_name": "@google-cloud/security-private-ca", - "release_level": "beta", - "default_version": "v1beta1", + "release_level": "ga", + "default_version": "v1", "language": "nodejs", "name_pretty": "Certificate Authority Service", "repo": "googleapis/nodejs-security-private-ca", diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 2509f3b462c..3c3d464d0fb 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -4,7 +4,7 @@ # [Certificate Authority Service: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) -[![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/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) @@ -72,7 +72,7 @@ const client = new CertificateAuthorityServiceClient(); async function listCertificates() { const res = await client.listCertificates({ - parent: `projects/${projectId}/locations/${location}/certificateAuthorities/${name}`, + parent: `projects/${projectId}/locations/${location}/caPools/${name}`, }); return res; } @@ -122,11 +122,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-security-privateca/samples/quickstart.js b/packages/google-cloud-security-privateca/samples/quickstart.js index 16031a61a96..20098dc4205 100644 --- a/packages/google-cloud-security-privateca/samples/quickstart.js +++ b/packages/google-cloud-security-privateca/samples/quickstart.js @@ -13,8 +13,6 @@ 'use strict'; -// eslint-disable-next-line no-unused-vars -const thing = 'hello'; async function main(projectId, location, name) { // [START cloud_certificate_authority_quickstart] // Imports the Google Cloud client library @@ -31,7 +29,7 @@ async function main(projectId, location, name) { async function listCertificates() { const res = await client.listCertificates({ - parent: `projects/${projectId}/locations/${location}/certificateAuthorities/${name}`, + parent: `projects/${projectId}/locations/${location}/caPools/${name}`, }); return res; } diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index 39a0a4e08b5..3c36f768230 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/src/index.ts @@ -19,10 +19,8 @@ import * as v1 from './v1'; import * as v1beta1 from './v1beta1'; -const CertificateAuthorityServiceClient = - v1beta1.CertificateAuthorityServiceClient; -type CertificateAuthorityServiceClient = - v1beta1.CertificateAuthorityServiceClient; +const CertificateAuthorityServiceClient = v1.CertificateAuthorityServiceClient; +type CertificateAuthorityServiceClient = v1.CertificateAuthorityServiceClient; export {v1, v1beta1, CertificateAuthorityServiceClient}; export default {v1, v1beta1, CertificateAuthorityServiceClient}; From 70b7e281cc2b890ab9dd39d2207dc1f4e0f78e37 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 30 Nov 2021 12:55:49 -0800 Subject: [PATCH 072/113] chore: release 3.0.0 (#140) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .../CHANGELOG.md | 19 +++++++++++++++++++ .../package.json | 2 +- .../samples/package.json | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index a3251bab89d..062e5edc83c 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## [3.0.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.5.0...v3.0.0) (2021-11-26) + + +### ⚠ BREAKING CHANGES + +* v1 removes methods 'restoreCertificateAuthority', 'scheduleDeleteCertificateAuthority', 'getReusableConfig', 'listReusableConfigs' +* resource paths have changed for some methods, e.g., certificateAuthorities becomes caPools +* default to v1 of the API (#88) + +### Features + +* default to v1 of the API ([#88](https://www.github.com/googleapis/nodejs-security-private-ca/issues/88)) ([a52d838](https://www.github.com/googleapis/nodejs-security-private-ca/commit/a52d8381e371f73ef21b22a8faa389235c58c5a8)) + + +### Code Refactoring + +* resource paths have changed for some methods, e.g., certificateAuthorities becomes caPools ([a52d838](https://www.github.com/googleapis/nodejs-security-private-ca/commit/a52d8381e371f73ef21b22a8faa389235c58c5a8)) +* v1 removes methods 'restoreCertificateAuthority', 'scheduleDeleteCertificateAuthority', 'getReusableConfig', 'listReusableConfigs' ([a52d838](https://www.github.com/googleapis/nodejs-security-private-ca/commit/a52d8381e371f73ef21b22a8faa389235c58c5a8)) + ## [2.5.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.4.1...v2.5.0) (2021-10-06) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index ef8abf94706..3771f2e7024 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "2.5.0", + "version": "3.0.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index ff5506e7864..e8be4e439f8 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^2.5.0" + "@google-cloud/security-private-ca": "^3.0.0" }, "devDependencies": { "c8": "^7.1.0", From 9c20a07a9acee0bdb51ac29df6c29393c3163e87 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 10 Dec 2021 21:16:12 +0000 Subject: [PATCH 073/113] build: add generated samples to .eslintignore (#142) --- packages/google-cloud-security-privateca/.eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/google-cloud-security-privateca/.eslintignore b/packages/google-cloud-security-privateca/.eslintignore index 9340ad9b86d..ea5b04aebe6 100644 --- a/packages/google-cloud-security-privateca/.eslintignore +++ b/packages/google-cloud-security-privateca/.eslintignore @@ -4,3 +4,4 @@ test/fixtures build/ docs/ protos/ +samples/generated/ From bd119b321a6adbfbeb1bfb5ecc983af9478eac55 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 21:38:34 +0000 Subject: [PATCH 074/113] docs(node): support "stable"/"preview" release level (#1312) (#145) --- packages/google-cloud-security-privateca/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 3c3d464d0fb..8835be26beb 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -132,6 +132,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 6b15f3ac3c915cede4a10bde2ffa025f847a4b0a Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 30 Dec 2021 12:18:01 -0500 Subject: [PATCH 075/113] chore: add api_shortname and library_type to repo metadata (#144) --- .../google-cloud-security-privateca/.repo-metadata.json | 6 ++++-- packages/google-cloud-security-privateca/README.md | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index 0ced8fb62d3..ad0be2b2c8f 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -2,7 +2,7 @@ "client_documentation": "https://cloud.google.com/nodejs/docs/reference/security-private-ca/latest", "api_id": "privateca.googleapis.com", "distribution_name": "@google-cloud/security-private-ca", - "release_level": "ga", + "release_level": "stable", "default_version": "v1", "language": "nodejs", "name_pretty": "Certificate Authority Service", @@ -10,5 +10,7 @@ "product_documentation": "https://cloud.google.com/certificate-authority-service", "requires_billing": true, "name": "security-private-ca", - "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues" + "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues", + "api_shortname": "privateca", + "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 8835be26beb..adcb748839a 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -4,7 +4,7 @@ # [Certificate Authority Service: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) -[![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/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) @@ -122,10 +122,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. @@ -133,7 +133,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 dddaf60e6f25496c5767575647cebeabbd137777 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 22:50:12 +0000 Subject: [PATCH 076/113] docs(badges): tweak badge to use new preview/stable language (#1314) (#147) --- packages/google-cloud-security-privateca/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index adcb748839a..f9e30a2919b 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -4,9 +4,8 @@ # [Certificate Authority Service: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) - +[![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/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-security-private-ca/main.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-security-private-ca) From a61814f63d4f6d3f6a24781fef61204e1a975d2b 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:20:16 +0000 Subject: [PATCH 077/113] test(nodejs): remove 15 add 16 (#1322) (#149) --- packages/google-cloud-security-privateca/protos/protos.d.ts | 2 +- packages/google-cloud-security-privateca/protos/protos.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index e1b5808c8b7..baff8a93582 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index 7b9035a0343..4ff954b0803 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/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 c83bb19062348857cc07f29039dd3a1590a1586b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 13 Jan 2022 16:32:15 +0100 Subject: [PATCH 078/113] chore(deps): update dependency gts to v3 (#150) 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 | |---|---|---|---|---|---| | [gts](https://togithub.com/google/gts) | [`^2.0.2` -> `^3.0.0`](https://renovatebot.com/diffs/npm/gts/2.0.2/3.1.0) | [![age](https://badges.renovateapi.com/packages/npm/gts/3.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/gts/3.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/gts/3.1.0/compatibility-slim/2.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/gts/3.1.0/confidence-slim/2.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
google/gts ### [`v3.1.0`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​310-httpswwwgithubcomgooglegtscomparev303v310-2021-01-11) [Compare Source](https://togithub.com/google/gts/compare/v3.0.3...v3.1.0) ##### Features - support comments in JSON ([#​571](https://www.togithub.com/google/gts/issues/571)) ([cb6d2ca](https://www.github.com/google/gts/commit/cb6d2cacb5de7bcc9c8e82dd47e14fc5bf9596a3)) ##### Bug Fixes - **deps:** update dependency eslint-config-prettier to v7 ([#​601](https://www.togithub.com/google/gts/issues/601)) ([6e26681](https://www.github.com/google/gts/commit/6e266812da4b90b18e2abead9b2b5a1ca0c6654b)) - **deps:** upgrade to latest version of meow ([#​616](https://www.togithub.com/google/gts/issues/616)) ([634bad9](https://www.github.com/google/gts/commit/634bad9bbbdb4d397bba101dc38ab14881172a30)) ##### [3.0.3](https://www.github.com/google/gts/compare/v3.0.2...v3.0.3) (2020-12-03) ##### Bug Fixes - **deps:** update dependency execa to v5 ([#​600](https://www.togithub.com/google/gts/issues/600)) ([4e5f1e5](https://www.github.com/google/gts/commit/4e5f1e54facf53588bbb3b025b5240edbd7f3c8a)) - **deps:** update dependency meow to v8 ([#​591](https://www.togithub.com/google/gts/issues/591)) ([c7e223e](https://www.github.com/google/gts/commit/c7e223e6a2ff605fabad2f8359a0385033f8de66)) ##### [3.0.2](https://www.github.com/google/gts/compare/v3.0.1...v3.0.2) (2020-10-26) ##### Bug Fixes - **deps:** loosen ts peer dependency ([#​589](https://www.togithub.com/google/gts/issues/589)) ([8f1d381](https://www.github.com/google/gts/commit/8f1d381d7b166a510c42786c4a337e81b7222c84)) ##### [3.0.1](https://www.github.com/google/gts/compare/v3.0.0...v3.0.1) (2020-10-12) ##### Bug Fixes - **rule:** turn off [@​typescript-eslint/no-var-requires](https://togithub.com/typescript-eslint/no-var-requires) ([#​578](https://www.togithub.com/google/gts/issues/578)) ([3b37229](https://www.github.com/google/gts/commit/3b37229c45969a3c53af123c69bb749578ee6b0b)) ### [`v3.0.3`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​303-httpswwwgithubcomgooglegtscomparev302v303-2020-12-03) [Compare Source](https://togithub.com/google/gts/compare/v3.0.2...v3.0.3) ### [`v3.0.2`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​302-httpswwwgithubcomgooglegtscomparev301v302-2020-10-26) [Compare Source](https://togithub.com/google/gts/compare/v3.0.1...v3.0.2) ### [`v3.0.1`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​301-httpswwwgithubcomgooglegtscomparev300v301-2020-10-12) [Compare Source](https://togithub.com/google/gts/compare/v3.0.0...v3.0.1) ### [`v3.0.0`](https://togithub.com/google/gts/blob/HEAD/CHANGELOG.md#​300-httpswwwgithubcomgooglegtscomparev202v300-2020-10-08) [Compare Source](https://togithub.com/google/gts/compare/v2.0.2...v3.0.0) ##### ⚠ BREAKING CHANGES - change default `check` to `lint` ([#​570](https://togithub.com/google/gts/issues/570)) - **deps:** require TypeScript 4.x ([#​565](https://togithub.com/google/gts/issues/565)) ##### Features - Add TypeScript v4 support ([#​551](https://www.togithub.com/google/gts/issues/551)) ([0883956](https://www.github.com/google/gts/commit/08839565a1d2b4b39d532c9b0b596f01b18856fe)) - change default `check` to `lint` ([#​570](https://www.togithub.com/google/gts/issues/570)) ([c527b66](https://www.github.com/google/gts/commit/c527b66be1ef6a78ea14b3d29225a8d7fb7097bd)) - generate .eslintignore when running init ([#​521](https://www.togithub.com/google/gts/issues/521)) ([8bce036](https://www.github.com/google/gts/commit/8bce0368767f0c2ad7d0700deb839962bc928d16)) ##### Bug Fixes - add build/.eslintrc.json to files field ([#​553](https://www.togithub.com/google/gts/issues/553)) ([3b516ad](https://www.github.com/google/gts/commit/3b516ad5e9f0d58201dde469461db7c6ed1c1b78)) - **deps:** require TypeScript 4.x ([#​565](https://www.togithub.com/google/gts/issues/565)) ([cbc5267](https://www.github.com/google/gts/commit/cbc5267579ef24e8c8ceaa2ef794df3ef54ea56a)) - **deps:** update dependency update-notifier to v5 ([#​574](https://www.togithub.com/google/gts/issues/574)) ([9a882bf](https://www.github.com/google/gts/commit/9a882bf4ac30ad06e7b91a65ad5721d8e8b41c4b)) - **deps:** update typescript-eslint monorepo to v2.34.0 ([#​509](https://www.togithub.com/google/gts/issues/509)) ([998a4ac](https://www.github.com/google/gts/commit/998a4ac9b75c97f04d8e5db37563f32d31652f23)) - **deps:** update typescript-eslint monorepo to v3 (major) ([#​528](https://www.togithub.com/google/gts/issues/528)) ([e22e173](https://www.github.com/google/gts/commit/e22e17338db2ddb7eb829c821037c2f4e77ff869)) - **deps:** update typescript-eslint monorepo to v4 ([#​556](https://www.togithub.com/google/gts/issues/556)) ([54148df](https://www.github.com/google/gts/commit/54148dfbd8b5f8b36a0f44f901c5db933393a661)) - better error message for broken tsconfig.json ([#​501](https://www.togithub.com/google/gts/issues/501)) ([0c17a76](https://www.github.com/google/gts/commit/0c17a76c6650eee1d8abaff11a897a432eeaa65f)) - prohibit calls for it.only and describe.only ([#​499](https://www.togithub.com/google/gts/issues/499)) ([071c33c](https://www.github.com/google/gts/commit/071c33ceef0e3765166aaebf6ed4698167ac0f98)) ##### [2.0.2](https://www.github.com/google/gts/compare/v2.0.1...v2.0.2) (2020-05-11) ##### Bug Fixes - Revert 'update dependency eslint to v7'" ([#​507](https://www.togithub.com/google/gts/issues/507)) ([0f9950b](https://www.github.com/google/gts/commit/0f9950b273329dbcce5f3cc20864c3dcd076f08c)) - **deps:** pin release of eslint-typescript ([#​508](https://www.togithub.com/google/gts/issues/508)) ([bd86b42](https://www.github.com/google/gts/commit/bd86b42e2bb904d3765dee82262e4691a11b9958)) - **deps:** update dependency eslint to v7 ([#​504](https://www.togithub.com/google/gts/issues/504)) ([6aee159](https://www.github.com/google/gts/commit/6aee1595d0486ae2c7fd68d16b1b59c4c4015753)) ##### [2.0.1](https://www.github.com/google/gts/compare/v2.0.0...v2.0.1) (2020-05-07) ##### Bug Fixes - throw an error if running with an unsupported version of nodejs ([#​493](https://www.togithub.com/google/gts/issues/493)) ([94fdf1e](https://www.github.com/google/gts/commit/94fdf1eaed634aa73c3e44c7a3d9f1325f773b07)) - **deps:** update dependency meow to v7 ([#​502](https://www.togithub.com/google/gts/issues/502)) ([cf91cda](https://www.github.com/google/gts/commit/cf91cda1afab25759427511d3c97d0037d61c649))
--- ### Configuration 📅 **Schedule**: "after 9am and before 3pm" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 3771f2e7024..b11fad5b590 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -46,7 +46,7 @@ "@types/node": "^16.0.0", "@types/sinon": "^10.0.0", "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 c7ba0b195f69df1a63216f75a8e93468ee275f32 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 20 Jan 2022 00:18:39 -0800 Subject: [PATCH 079/113] build: update copyright year to 2022 (#152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): upgrade gapic-generator-java to 2.4.1 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 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- packages/google-cloud-security-privateca/.jsdoc.js | 4 ++-- ...thority_service.activate_certificate_authority.js | 8 +++----- .../certificate_authority_service.create_ca_pool.js | 4 ++-- ...rtificate_authority_service.create_certificate.js | 4 ++-- ...authority_service.create_certificate_authority.js | 8 +++----- ..._authority_service.create_certificate_template.js | 8 +++----- .../certificate_authority_service.delete_ca_pool.js | 4 ++-- ...authority_service.delete_certificate_authority.js | 8 +++----- ..._authority_service.delete_certificate_template.js | 8 +++----- ...uthority_service.disable_certificate_authority.js | 8 +++----- ...authority_service.enable_certificate_authority.js | 8 +++----- .../certificate_authority_service.fetch_ca_certs.js | 4 ++-- ...hority_service.fetch_certificate_authority_csr.js | 8 +++----- .../v1/certificate_authority_service.get_ca_pool.js | 4 ++-- .../certificate_authority_service.get_certificate.js | 4 ++-- ...te_authority_service.get_certificate_authority.js | 4 ++-- ...hority_service.get_certificate_revocation_list.js | 8 +++----- ...ate_authority_service.get_certificate_template.js | 4 ++-- .../certificate_authority_service.list_ca_pools.js | 6 +++--- ...authority_service.list_certificate_authorities.js | 10 ++++------ ...rity_service.list_certificate_revocation_lists.js | 12 +++++------- ...e_authority_service.list_certificate_templates.js | 10 ++++------ ...ertificate_authority_service.list_certificates.js | 6 +++--- ...rtificate_authority_service.revoke_certificate.js | 4 ++-- ...thority_service.undelete_certificate_authority.js | 8 +++----- .../certificate_authority_service.update_ca_pool.js | 4 ++-- ...rtificate_authority_service.update_certificate.js | 4 ++-- ...authority_service.update_certificate_authority.js | 8 +++----- ...ity_service.update_certificate_revocation_list.js | 8 +++----- ..._authority_service.update_certificate_template.js | 8 +++----- ...thority_service.activate_certificate_authority.js | 8 +++----- ...rtificate_authority_service.create_certificate.js | 6 +++--- ...authority_service.create_certificate_authority.js | 8 +++----- ...uthority_service.disable_certificate_authority.js | 8 +++----- ...authority_service.enable_certificate_authority.js | 8 +++----- ...hority_service.fetch_certificate_authority_csr.js | 8 +++----- .../certificate_authority_service.get_certificate.js | 4 ++-- ...te_authority_service.get_certificate_authority.js | 4 ++-- ...hority_service.get_certificate_revocation_list.js | 8 +++----- ...tificate_authority_service.get_reusable_config.js | 4 ++-- ...authority_service.list_certificate_authorities.js | 10 ++++------ ...rity_service.list_certificate_revocation_lists.js | 12 +++++------- ...ertificate_authority_service.list_certificates.js | 6 +++--- ...ficate_authority_service.list_reusable_configs.js | 6 +++--- ...uthority_service.restore_certificate_authority.js | 8 +++----- ...rtificate_authority_service.revoke_certificate.js | 4 ++-- ..._service.schedule_delete_certificate_authority.js | 7 +++---- ...rtificate_authority_service.update_certificate.js | 4 ++-- ...authority_service.update_certificate_authority.js | 8 +++----- ...ity_service.update_certificate_revocation_list.js | 8 +++----- .../src/v1/certificate_authority_service_client.ts | 2 +- .../google-cloud-security-privateca/src/v1/index.ts | 2 +- .../v1beta1/certificate_authority_service_client.ts | 2 +- .../src/v1beta1/index.ts | 2 +- .../system-test/fixtures/sample/src/index.js | 2 +- .../system-test/fixtures/sample/src/index.ts | 2 +- .../system-test/install.ts | 2 +- .../test/gapic_certificate_authority_service_v1.ts | 2 +- .../gapic_certificate_authority_service_v1beta1.ts | 2 +- 59 files changed, 149 insertions(+), 204 deletions(-) diff --git a/packages/google-cloud-security-privateca/.jsdoc.js b/packages/google-cloud-security-privateca/.jsdoc.js index c2bc4d431fc..8ee410724fd 100644 --- a/packages/google-cloud-security-privateca/.jsdoc.js +++ b/packages/google-cloud-security-privateca/.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/security-private-ca', diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js index 1dbf9b2d397..aba8590eaa5 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, pemCaCertificate, subordinateConfig) { @@ -50,8 +51,7 @@ function main(name, pemCaCertificate, subordinateConfig) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -65,9 +65,7 @@ function main(name, pemCaCertificate, subordinateConfig) { }; // Run request - const [operation] = await privatecaClient.activateCertificateAuthority( - request - ); + const [operation] = await privatecaClient.activateCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js index a548f199fdf..518f17d618d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, caPoolId, caPool) { @@ -49,8 +50,7 @@ function main(parent, caPoolId, caPool) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js index c973ae5c605..ceaece45335 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, certificate) { @@ -71,8 +72,7 @@ function main(parent, certificate) { // const issuingCertificateAuthorityId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js index c196857cda2..a9130d72cc2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, certificateAuthorityId, certificateAuthority) { @@ -50,8 +51,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -65,9 +65,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { }; // Run request - const [operation] = await privatecaClient.createCertificateAuthority( - request - ); + const [operation] = await privatecaClient.createCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js index 66428f59f2e..d3762e8c05a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_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, certificateTemplateId, certificateTemplate) { @@ -50,8 +51,7 @@ function main(parent, certificateTemplateId, certificateTemplate) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -65,9 +65,7 @@ function main(parent, certificateTemplateId, certificateTemplate) { }; // Run request - const [operation] = await privatecaClient.createCertificateTemplate( - request - ); + const [operation] = await privatecaClient.createCertificateTemplate(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js index f46c8317fe1..de7a3f87382 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js index 47d2db55f63..6a84fef206d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -45,8 +46,7 @@ function main(name) { // const ignoreActiveCertificates = true // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -58,9 +58,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.deleteCertificateAuthority( - request - ); + const [operation] = await privatecaClient.deleteCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js index 0cd1530dddc..b99d60ece44 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_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) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.deleteCertificateTemplate( - request - ); + const [operation] = await privatecaClient.deleteCertificateTemplate(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js index 80765a5c979..ee24b929855 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.disableCertificateAuthority( - request - ); + const [operation] = await privatecaClient.disableCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js index f97901efc59..9cc57b97223 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.enableCertificateAuthority( - request - ); + const [operation] = await privatecaClient.enableCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js index b15aa304978..85885021a30 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(caPool) { @@ -40,8 +41,7 @@ function main(caPool) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js index b1f4ff11b21..cde95d29f09 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -39,9 +39,7 @@ function main(name) { }; // Run request - const response = await privatecaClient.fetchCertificateAuthorityCsr( - request - ); + const response = await privatecaClient.fetchCertificateAuthorityCsr(request); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js index 182037ecdaa..ba7728122e0 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -25,8 +26,7 @@ function main(name) { // const name = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js index 49032f5a7e4..96aafda0342 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -25,8 +26,7 @@ function main(name) { // const name = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js index bd0690bda09..aa0d321093c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js index b7c72c60562..77749e234b4 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -39,9 +39,7 @@ function main(name) { }; // Run request - const response = await privatecaClient.getCertificateRevocationList( - request - ); + const response = await privatecaClient.getCertificateRevocationList(request); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js index 12937ba06ff..9e2aa035f29 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js index 2753ad847bb..84828a333b3 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -64,7 +64,7 @@ function main(parent) { // Run request const iterable = await privatecaClient.listCaPoolsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js index ba74e6a75b2..797e395a4cd 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -62,11 +62,9 @@ function main(parent) { }; // Run request - const iterable = await privatecaClient.listCertificateAuthoritiesAsync( - request - ); + const iterable = await privatecaClient.listCertificateAuthoritiesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js index d699bb9ba2f..aac8c8994b8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -28,7 +29,7 @@ function main(parent) { /** * Optional. Limit on the number of * CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList to include in the - * response. Further CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList + * response. Further CertificateRevocationLists google.cloud.security.privateca.v1.CertificateRevocationList * can subsequently be obtained by including the * ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -62,11 +62,9 @@ function main(parent) { }; // Run request - const iterable = await privatecaClient.listCertificateRevocationListsAsync( - request - ); + const iterable = await privatecaClient.listCertificateRevocationListsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js index aadc7259ef9..12af5975da7 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_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) { @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -62,11 +62,9 @@ function main(parent) { }; // Run request - const iterable = await privatecaClient.listCertificateTemplatesAsync( - request - ); + const iterable = await privatecaClient.listCertificateTemplatesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js index 5074b79c674..0ef68f09f2b 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -53,8 +54,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -68,7 +68,7 @@ function main(parent) { // Run request const iterable = await privatecaClient.listCertificatesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js index 9bf99452349..376ef3e62d4 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, reason) { @@ -45,8 +46,7 @@ function main(name, reason) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js index cdcdeb85c57..c74c1827b2b 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.undeleteCertificateAuthority( - request - ); + const [operation] = await privatecaClient.undeleteCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js index d0c3c69217a..3a547ad34d7 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(caPool, updateMask) { @@ -43,8 +44,7 @@ function main(caPool, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js index c33169963d7..b116a7c70a9 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificate, updateMask) { @@ -43,8 +44,7 @@ function main(certificate, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js index 53c93df032a..139f8a4453e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificateAuthority, updateMask) { @@ -43,8 +44,7 @@ function main(certificateAuthority, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -57,9 +57,7 @@ function main(certificateAuthority, updateMask) { }; // Run request - const [operation] = await privatecaClient.updateCertificateAuthority( - request - ); + const [operation] = await privatecaClient.updateCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js index f6709783b56..6a8cd74e5a7 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificateRevocationList, updateMask) { @@ -43,8 +44,7 @@ function main(certificateRevocationList, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -57,9 +57,7 @@ function main(certificateRevocationList, updateMask) { }; // Run request - const [operation] = await privatecaClient.updateCertificateRevocationList( - request - ); + const [operation] = await privatecaClient.updateCertificateRevocationList(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js index c8259e45370..03be43d9986 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificateTemplate, updateMask) { @@ -43,8 +44,7 @@ function main(certificateTemplate, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -57,9 +57,7 @@ function main(certificateTemplate, updateMask) { }; // Run request - const [operation] = await privatecaClient.updateCertificateTemplate( - request - ); + const [operation] = await privatecaClient.updateCertificateTemplate(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js index 5736d2b9174..d999eee029f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, pemCaCertificate, subordinateConfig) { @@ -50,8 +51,7 @@ function main(name, pemCaCertificate, subordinateConfig) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -65,9 +65,7 @@ function main(name, pemCaCertificate, subordinateConfig) { }; // Run request - const [operation] = await privatecaClient.activateCertificateAuthority( - request - ); + const [operation] = await privatecaClient.activateCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js index 187069f2022..ee439d40829 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, certificate) { @@ -20,7 +21,7 @@ function main(parent, certificate) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The resource name of the location and CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority + * Required. The resource name of the location and CertificateAuthority google.cloud.security.privateca.v1beta1.CertificateAuthority * associated with the Certificate google.cloud.security.privateca.v1beta1.Certificate, in the format * `projects/* /locations/* /certificateAuthorities/*`. */ @@ -52,8 +53,7 @@ function main(parent, certificate) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js index 3b385cbe645..34b71d0bb1d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent, certificateAuthorityId, certificateAuthority) { @@ -50,8 +51,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -65,9 +65,7 @@ function main(parent, certificateAuthorityId, certificateAuthority) { }; // Run request - const [operation] = await privatecaClient.createCertificateAuthority( - request - ); + const [operation] = await privatecaClient.createCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js index b5bb0dd8b9c..cf90d2c1548 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.disableCertificateAuthority( - request - ); + const [operation] = await privatecaClient.disableCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js index b33f9097bbf..8866519e8a2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.enableCertificateAuthority( - request - ); + const [operation] = await privatecaClient.enableCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js index 03be2130011..801163663b8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -39,9 +39,7 @@ function main(name) { }; // Run request - const response = await privatecaClient.fetchCertificateAuthorityCsr( - request - ); + const response = await privatecaClient.fetchCertificateAuthorityCsr(request); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js index 46b907223fd..23ce3f3e8a2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -25,8 +26,7 @@ function main(name) { // const name = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js index 71a9d8b5110..e260e29b53c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js index 4da0748cfa0..b18f79b20e5 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.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 Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -39,9 +39,7 @@ function main(name) { }; // Run request - const response = await privatecaClient.getCertificateRevocationList( - request - ); + const response = await privatecaClient.getCertificateRevocationList(request); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js index b056d529c3f..edd08dc7f06 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -25,8 +26,7 @@ function main(name) { // const name = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js index 5e999432c15..3518e2ce115 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -62,11 +62,9 @@ function main(parent) { }; // Run request - const iterable = await privatecaClient.listCertificateAuthoritiesAsync( - request - ); + const iterable = await privatecaClient.listCertificateAuthoritiesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js index 0e9360dc00e..5200e8b1558 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -28,7 +29,7 @@ function main(parent) { /** * Optional. Limit on the number of * CertificateRevocationLists google.cloud.security.privateca.v1beta1.CertificateRevocationList to include in the - * response. Further CertificateRevocationLists google.cloud.security.privateca.v1beta1.CertificateRevocationList + * response. Further CertificateRevocationLists google.cloud.security.privateca.v1beta1.CertificateRevocationList * can subsequently be obtained by including the * ListCertificateRevocationListsResponse.next_page_token google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse.next_page_token in a subsequent * request. If unspecified, the server will pick an appropriate default. @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -62,11 +62,9 @@ function main(parent) { }; // Run request - const iterable = await privatecaClient.listCertificateRevocationListsAsync( - request - ); + const iterable = await privatecaClient.listCertificateRevocationListsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js index dcbef72f8ea..ea675f65866 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -53,8 +54,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -68,7 +68,7 @@ function main(parent) { // Run request const iterable = await privatecaClient.listCertificatesAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js index 1511beb0bfd..cfc7e093138 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(parent) { @@ -49,8 +50,7 @@ function main(parent) { // const orderBy = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -64,7 +64,7 @@ function main(parent) { // Run request const iterable = await privatecaClient.listReusableConfigsAsync(request); for await (const response of iterable) { - console.log(response); + console.log(response); } } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js index f102c0bf589..a6699de42be 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,9 +53,7 @@ function main(name) { }; // Run request - const [operation] = await privatecaClient.restoreCertificateAuthority( - request - ); + const [operation] = await privatecaClient.restoreCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js index a81d4f7523b..37a37b1e67b 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name, reason) { @@ -44,8 +45,7 @@ function main(name, reason) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js index a27f19f36a8..cf42fdb0a3f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(name) { @@ -40,8 +41,7 @@ function main(name) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -53,8 +53,7 @@ function main(name) { }; // Run request - const [operation] = - await privatecaClient.scheduleDeleteCertificateAuthority(request); + const [operation] = await privatecaClient.scheduleDeleteCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js index 1996d88dece..6eeaea6c0e3 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificate, updateMask) { @@ -43,8 +44,7 @@ function main(certificate, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js index eacf2fadf26..f9b56294c4a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificateAuthority, updateMask) { @@ -43,8 +44,7 @@ function main(certificateAuthority, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -57,9 +57,7 @@ function main(certificateAuthority, updateMask) { }; // Run request - const [operation] = await privatecaClient.updateCertificateAuthority( - request - ); + const [operation] = await privatecaClient.updateCertificateAuthority(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js index 51f951f4e8d..28bbe52330d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. + 'use strict'; function main(certificateRevocationList, updateMask) { @@ -43,8 +44,7 @@ function main(certificateRevocationList, updateMask) { // const requestId = 'abc123' // Imports the Privateca library - const {CertificateAuthorityServiceClient} = - require('@google-cloud/security-private-ca').v1beta1; + const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1beta1; // Instantiates a client const privatecaClient = new CertificateAuthorityServiceClient(); @@ -57,9 +57,7 @@ function main(certificateRevocationList, updateMask) { }; // Run request - const [operation] = await privatecaClient.updateCertificateRevocationList( - request - ); + const [operation] = await privatecaClient.updateCertificateRevocationList(request); const [response] = await operation.promise(); console.log(response); } diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 6ed86777749..e4c53af68be 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_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-security-privateca/src/v1/index.ts b/packages/google-cloud-security-privateca/src/v1/index.ts index 707c36defcc..846c95b5077 100644 --- a/packages/google-cloud-security-privateca/src/v1/index.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index eba8e8b2e17..fb46daf7a00 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_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-security-privateca/src/v1beta1/index.ts b/packages/google-cloud-security-privateca/src/v1beta1/index.ts index 707c36defcc..846c95b5077 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/index.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/system-test/fixtures/sample/src/index.js b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js index 451a6f76516..3c65c5d70cc 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-security-privateca/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-security-privateca/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts index e92b7556f78..723e52b329b 100644 --- a/packages/google-cloud-security-privateca/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/system-test/install.ts b/packages/google-cloud-security-privateca/system-test/install.ts index d2d61c0396f..6dd1eaadafa 100644 --- a/packages/google-cloud-security-privateca/system-test/install.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 52414963a14..4958cdd0599 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_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-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 7c8d0a41aa2..134d4a68a9f 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_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 fb4226e97b5450c539eebc7b5d44968dfd357cc7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 27 Jan 2022 16:32:18 +0000 Subject: [PATCH 080/113] chore: update v2.12.0 gapic-generator-typescript (#154) - [ ] Regenerate this pull request now. Committer: @summer-ji-eng PiperOrigin-RevId: 424244721 Source-Link: https://github.com/googleapis/googleapis/commit/4b6b01f507ebc3df95fdf8e1d76b0ae0ae33e52c Source-Link: https://github.com/googleapis/googleapis-gen/commit/8ac83fba606d008c7e8a42e7d55b6596ec4be35f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGFjODNmYmE2MDZkMDA4YzdlOGE0MmU3ZDU1YjY1OTZlYzRiZTM1ZiJ9 --- .../linkinator.config.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/linkinator.config.json b/packages/google-cloud-security-privateca/linkinator.config.json index 0121dfa684f..befd23c8633 100644 --- a/packages/google-cloud-security-privateca/linkinator.config.json +++ b/packages/google-cloud-security-privateca/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 } From 0109dbc208067ef53cabcbfc9f62b6d297730b25 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Feb 2022 17:06:59 +0100 Subject: [PATCH 081/113] chore(deps): update dependency sinon to v13 (#156) 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.1) | [![age](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/compatibility-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/sinon/13.0.1/confidence-slim/12.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sinonjs/sinon ### [`v13.0.1`](https://togithub.com/sinonjs/sinon/blob/HEAD/CHANGES.md#​1301) [Compare Source](https://togithub.com/sinonjs/sinon/compare/v13.0.0...v13.0.1) - [`ec4223f9`](https://togithub.com/sinonjs/sinon/commit/ec4223f94076d809483e3c6a7536cfc1278dd3c9) Bump nise to fix [sinonjs/nise#​193](https://togithub.com/sinonjs/nise/issues/193) (Carl-Erik Kopseng) - [`f329a010`](https://togithub.com/sinonjs/sinon/commit/f329a01040bfa5a79e039419220b21eda56935d6) Add unimported to workflow ([#​2441](https://togithub.com/sinonjs/sinon/issues/2441)) (Morgan Roderick) - [`7f16cec9`](https://togithub.com/sinonjs/sinon/commit/7f16cec968c3c8d4e580267fb00195916d6f827d) Enable updates to same major version (Carl-Erik Kopseng) - [`f784d7ad`](https://togithub.com/sinonjs/sinon/commit/f784d7ad2c86be0fc65477d69f8bdafca846ef2c) Re-introduce new version.sh script to version hook (Joel Bradshaw) > This was inadvertently removed during merge conflicts, and is required > for any of the new release process stuff to work - [`51c508ab`](https://togithub.com/sinonjs/sinon/commit/51c508ab77cf0f9fb8c5305ff626f6a2eada178f) Add dry run mode to `npm version` ([#​2436](https://togithub.com/sinonjs/sinon/issues/2436)) (Joel Bradshaw) > - Add DRY_RUN flag to skip publish/push > > - Allow overriding branch names for testing - [`05341dcf`](https://togithub.com/sinonjs/sinon/commit/05341dcf92ddca4a1d4c90966b1fcdc7039cff18) Update npm version scripts to manage new releases branch (Joel Bradshaw) - [`fe658261`](https://togithub.com/sinonjs/sinon/commit/fe65826171db69ed2986a1060db77944dbc98a6d) Remove release archives from master (Joel Bradshaw) > These archives made it difficult to find things in the GitHub interface, > and take up a lot of space in a checked-out repo for something that is > not useful to most people checking out the repository. > > The main purpose of these archives is to make old versions and > documentation available on the Sinon website that is run out of this > repo. This can be supported by using a separate branch for website > releases, and to maintain the archives. > > Following this commit, the `npm version` scripts will be updated to > automatically handle archiving the releases in the new releases branch > and keeping it up to date with master. > > Also remove the directories we removed from .prettierignore, since they > don't exist any more. *Released by [Carl-Erik Kopseng](https://togithub.com/fatso83) on 2022-02-01.* ### [`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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index b11fad5b590..9ddd3f253ed 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -54,7 +54,7 @@ "mocha": "^8.1.2", "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", "webpack": "^5.0.0", From 100a89e2e810839d6b10d157808a92ab440896d4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 23:54:18 +0000 Subject: [PATCH 082/113] docs: mark CaPool.lifetime as IMMUTABLE docs: add format requirements on `custom_sans` (#157) PiperOrigin-RevId: 425978220 Source-Link: https://github.com/googleapis/googleapis/commit/16ce67566cbe684e451be68b2bd21c0fa7fca8f8 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ca0915494a7708d04c137058c4eafe65816a1e7b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2EwOTE1NDk0YTc3MDhkMDRjMTM3MDU4YzRlYWZlNjU4MTZhMWU3YiJ9 --- .../security/privateca/v1/resources.proto | 116 +- .../cloud/security/privateca/v1/service.proto | 12 +- .../protos/protos.d.ts | 644 +++---- .../protos/protos.js | 1630 ++++++++--------- .../protos/protos.json | 224 +-- ...te_authority_service.create_certificate.js | 10 +- .../certificate_authority_service_client.ts | 10 +- 7 files changed, 1325 insertions(+), 1321 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto index fb73f15b896..2eaa1c8a082 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/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. @@ -16,12 +16,12 @@ syntax = "proto3"; package google.cloud.security.privateca.v1; +import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/type/expr.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1"; @@ -40,34 +40,6 @@ message CertificateAuthority { pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}" }; - // URLs where a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will publish content. - message AccessUrls { - // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate is - // published. This will only be set for CAs that have been activated. - string ca_certificate_access_url = 1; - - // The URLs where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRLs are published. This - // will only be set for CAs that have been activated. - repeated string crl_access_urls = 2; - } - - // A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will use. - message KeyVersionSpec { - oneof KeyVersion { - // The resource name for an existing Cloud KMS CryptoKeyVersion in the - // format - // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. - // This option enables full flexibility in the key's capabilities and - // properties. - string cloud_kms_key_version = 1; - - // The algorithm to use for creating a managed Cloud KMS key for a for a - // simplified experience. All managed keys will be have their - // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. - SignHashAlgorithm algorithm = 2; - } - } - // The type of a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], indicating its issuing chain. enum Type { // Not specified. @@ -115,6 +87,34 @@ message CertificateAuthority { DELETED = 5; } + // URLs where a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will publish content. + message AccessUrls { + // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate is + // published. This will only be set for CAs that have been activated. + string ca_certificate_access_url = 1; + + // The URLs where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRLs are published. This + // will only be set for CAs that have been activated. + repeated string crl_access_urls = 2; + } + + // A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will use. + message KeyVersionSpec { + oneof KeyVersion { + // The resource name for an existing Cloud KMS CryptoKeyVersion in the + // format + // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. + // This option enables full flexibility in the key's capabilities and + // properties. + string cloud_kms_key_version = 1; + + // The algorithm to use for creating a managed Cloud KMS key for a for a + // simplified experience. All managed keys will be have their + // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`. + SignHashAlgorithm algorithm = 2; + } + } + // The algorithm of a Cloud KMS CryptoKeyVersion of a // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value @@ -122,7 +122,7 @@ message CertificateAuthority { // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] // values. For RSA signing algorithms, the PSS algorithms should be preferred, // use PKCS1 algorithms if required for compatibility. For further - // recommandations, see + // recommendations, see // https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations. enum SignHashAlgorithm { // Not specified. @@ -169,10 +169,13 @@ message CertificateAuthority { (google.api.field_behavior) = IMMUTABLE ]; - // Required. The desired lifetime of the CA certificate. Used to create the + // Required. Immutable. The desired lifetime of the CA certificate. Used to create the // "not_before_time" and "not_after_time" fields inside an X.509 // certificate. - google.protobuf.Duration lifetime = 4 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.Duration lifetime = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; // Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. If this // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] is a self-signed CertificateAuthority, this key @@ -246,6 +249,19 @@ message CaPool { pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}" }; + // The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool], indicating its supported functionality and/or + // billing SKU. + enum Tier { + // Not specified. + TIER_UNSPECIFIED = 0; + + // Enterprise tier. + ENTERPRISE = 1; + + // DevOps tier. + DEVOPS = 2; + } + // Options relating to the publication of each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA // certificate and CRLs and their inclusion as extensions in issued // [Certificates][google.cloud.security.privateca.v1.Certificate]. The options set here apply to certificates @@ -279,14 +295,14 @@ message CaPool { // Describes an RSA key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued from // a [CaPool][google.cloud.security.privateca.v1.CaPool]. message RsaKeyType { - // Optional. The minimum allowed RSA modulus size, in bits. If this is not set, - // or if set to zero, the service-level min RSA modulus size will - // continue to apply. + // Optional. The minimum allowed RSA modulus size (inclusive), in bits. If this is + // not set, or if set to zero, the service-level min RSA modulus size + // will continue to apply. int64 min_modulus_size = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The maximum allowed RSA modulus size, in bits. If this is not set, - // or if set to zero, the service will not enforce an explicit upper - // bound on RSA modulus sizes. + // Optional. The maximum allowed RSA modulus size (inclusive), in bits. If this is + // not set, or if set to zero, the service will not enforce an explicit + // upper bound on RSA modulus sizes. int64 max_modulus_size = 2 [(google.api.field_behavior) = OPTIONAL]; } @@ -382,19 +398,6 @@ message CaPool { CertificateExtensionConstraints passthrough_extensions = 6 [(google.api.field_behavior) = OPTIONAL]; } - // The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool], indicating its supported functionality and/or - // billing SKU. - enum Tier { - // Not specified. - TIER_UNSPECIFIED = 0; - - // Enterprise tier. - ENTERPRISE = 1; - - // DevOps tier. - DEVOPS = 2; - } - // Output only. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the // format `projects/*/locations/*/caPools/*`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -691,10 +694,9 @@ message SubordinateConfig { } oneof subordinate_config { - // Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the same project that - // was used to create a subordinate [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. This field - // is used for information and usability purposes only. The resource name - // is in the format + // Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that was used to create a + // subordinate [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. This field is used for information + // and usability purposes only. The resource name is in the format // `projects/*/locations/*/caPools/*/certificateAuthorities/*`. string certificate_authority = 1 [ (google.api.field_behavior) = REQUIRED, @@ -985,6 +987,8 @@ message SubjectAltNames { repeated string ip_addresses = 4; // Contains additional subject alternative name values. + // For each custom_san, the `value` field must contain an ASN.1 encoded + // UTF8String. repeated X509Extension custom_sans = 5; } diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto index f13ce093e2a..4dcfc4f068c 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.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. @@ -385,11 +385,11 @@ message CreateCertificateRequest { // already been completed. The server will guarantee that for at least 60 // minutes since the first request. // - // For example, consider a situation where you make an initial request and t - // he request times out. If you make the request again with the same request - // ID, the server can check if original operation with the same request ID - // was received, and if so, will ignore the second request. This prevents - // clients from accidentally creating duplicate commitments. + // For example, consider a situation where you make an initial request and the + // request times out. If you make the request again with the same request ID, + // the server can check if original operation with the same request ID was + // received, and if so, will ignore the second request. This prevents clients + // from accidentally creating duplicate commitments. // // The request ID must be a valid UUID with the exception that zero UUID is // not supported (00000000-0000-0000-0000-000000000000). diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index baff8a93582..c3f61e5a26b 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -217,6 +217,23 @@ export namespace google { namespace CertificateAuthority { + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + SELF_SIGNED = 1, + SUBORDINATE = 2 + } + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ENABLED = 1, + DISABLED = 2, + STAGED = 3, + AWAITING_USER_ACTIVATION = 4, + DELETED = 5 + } + /** Properties of an AccessUrls. */ interface IAccessUrls { @@ -412,23 +429,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - SELF_SIGNED = 1, - SUBORDINATE = 2 - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ENABLED = 1, - DISABLED = 2, - STAGED = 3, - AWAITING_USER_ACTIVATION = 4, - DELETED = 5 - } - /** SignHashAlgorithm enum. */ enum SignHashAlgorithm { SIGN_HASH_ALGORITHM_UNSPECIFIED = 0, @@ -559,6 +559,13 @@ export namespace google { namespace CaPool { + /** Tier enum. */ + enum Tier { + TIER_UNSPECIFIED = 0, + ENTERPRISE = 1, + DEVOPS = 2 + } + /** Properties of a PublishingOptions. */ interface IPublishingOptions { @@ -1172,13 +1179,6 @@ export namespace google { public toJSON(): { [k: string]: any }; } } - - /** Tier enum. */ - enum Tier { - TIER_UNSPECIFIED = 0, - ENTERPRISE = 1, - DEVOPS = 2 - } } /** Properties of a CertificateRevocationList. */ @@ -15272,590 +15272,590 @@ export namespace google { /** Namespace api. */ namespace api { - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** Properties of a 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); + /** Properties of a Http. */ + interface IHttp { - /** ResourceDescriptor singular */ - singular?: (string|null); + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new ResourceDescriptor. + * Constructs a new Http. * @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; + constructor(properties?: google.api.IHttp); - /** ResourceDescriptor singular. */ - public singular: string; + /** Http rules. */ + public rules: google.api.IHttpRule[]; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceDescriptor instance + * @returns Http instance */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + public static create(properties?: google.api.IHttp): google.api.Http; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode + * 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.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IHttp, 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 + * 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.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * 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 ResourceDescriptor + * @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.ResourceDescriptor; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor + * @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.ResourceDescriptor; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; /** - * Verifies a ResourceDescriptor message. + * 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * 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.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - namespace ResourceDescriptor { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** HttpRule selector */ + selector?: (string|null); - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** HttpRule get */ + get?: (string|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** HttpRule put */ + put?: (string|null); - /** ResourceReference type */ - type?: (string|null); + /** HttpRule post */ + post?: (string|null); - /** ResourceReference childType */ - childType?: (string|null); - } + /** HttpRule delete */ + "delete"?: (string|null); - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** HttpRule patch */ + patch?: (string|null); - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** ResourceReference type. */ - public type: string; + /** HttpRule body */ + body?: (string|null); - /** ResourceReference childType. */ - public childType: string; + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Creates a new ResourceReference instance using the specified properties. + * Constructs a new HttpRule. * @param [properties] Properties to set - * @returns ResourceReference instance */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + constructor(properties?: google.api.IHttpRule); - /** - * 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; + /** HttpRule selector. */ + public selector: string; - /** - * 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; + /** HttpRule get. */ + public get?: (string|null); - /** - * 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; + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * 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 - * @returns ResourceReference + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; /** - * Verifies a ResourceReference message. + * 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceReference + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference + * 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.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceReference to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a Http. */ - interface IHttp { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new Http. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.api.ICustomHttpPattern); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** CustomHttpPattern kind. */ + public kind: string; - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a new Http instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @param [properties] Properties to set - * @returns Http instance + * @returns CustomHttpPattern instance */ - public static create(properties?: google.api.IHttp): google.api.Http; + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode + * 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.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.ICustomHttpPattern, 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 + * 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.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Http message from the specified reader or buffer. + * 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 Http + * @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.Http; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Http + * @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.Http; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; /** - * Verifies a Http message. + * 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 Http message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * 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.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this CustomHttpPattern 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); + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } - /** HttpRule put */ - put?: (string|null); + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** HttpRule post */ - post?: (string|null); + /** ResourceDescriptor type */ + type?: (string|null); - /** HttpRule delete */ - "delete"?: (string|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** HttpRule patch */ - patch?: (string|null); + /** ResourceDescriptor nameField */ + nameField?: (string|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - /** HttpRule body */ - body?: (string|null); + /** ResourceDescriptor plural */ + plural?: (string|null); - /** HttpRule responseBody */ - responseBody?: (string|null); + /** ResourceDescriptor singular */ + singular?: (string|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new HttpRule. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); + constructor(properties?: google.api.IResourceDescriptor); - /** HttpRule delete. */ - public delete?: (string|null); + /** ResourceDescriptor type. */ + public type: string; - /** HttpRule patch. */ - public patch?: (string|null); + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** ResourceDescriptor nameField. */ + public nameField: string; - /** HttpRule body. */ - public body: string; + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - /** HttpRule responseBody. */ - public responseBody: string; + /** ResourceDescriptor plural. */ + public plural: string; - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; + /** ResourceDescriptor singular. */ + public singular: string; - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns HttpRule instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode + * 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.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, 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 + * 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.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a HttpRule message from the specified reader or buffer. + * 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 HttpRule + * @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.HttpRule; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns HttpRule + * @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.HttpRule; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a HttpRule message. + * 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns HttpRule + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * 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.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + namespace ResourceDescriptor { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } - /** CustomHttpPattern path */ - path?: (string|null); + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** 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 CustomHttpPattern. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); + constructor(properties?: google.api.IResourceReference); - /** CustomHttpPattern kind. */ - public kind: string; + /** ResourceReference type. */ + public type: string; - /** CustomHttpPattern path. */ - public path: string; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @param [properties] Properties to set - * @returns CustomHttpPattern instance + * @returns ResourceReference instance */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode + * 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceReference, 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 + * 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.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * 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 CustomHttpPattern + * @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.CustomHttpPattern; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern + * @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.CustomHttpPattern; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; /** - * Verifies a CustomHttpPattern message. + * 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * 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.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; diff --git a/packages/google-cloud-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index 4ff954b0803..72e003e1194 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -801,6 +801,44 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Type enum. + * @name google.cloud.security.privateca.v1.CertificateAuthority.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} SELF_SIGNED=1 SELF_SIGNED value + * @property {number} SUBORDINATE=2 SUBORDINATE value + */ + CertificateAuthority.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SELF_SIGNED"] = 1; + values[valuesById[2] = "SUBORDINATE"] = 2; + return values; + })(); + + /** + * State enum. + * @name google.cloud.security.privateca.v1.CertificateAuthority.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ENABLED=1 ENABLED value + * @property {number} DISABLED=2 DISABLED value + * @property {number} STAGED=3 STAGED value + * @property {number} AWAITING_USER_ACTIVATION=4 AWAITING_USER_ACTIVATION value + * @property {number} DELETED=5 DELETED value + */ + CertificateAuthority.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENABLED"] = 1; + values[valuesById[2] = "DISABLED"] = 2; + values[valuesById[3] = "STAGED"] = 3; + values[valuesById[4] = "AWAITING_USER_ACTIVATION"] = 4; + values[valuesById[5] = "DELETED"] = 5; + return values; + })(); + CertificateAuthority.AccessUrls = (function() { /** @@ -1308,44 +1346,6 @@ return KeyVersionSpec; })(); - /** - * Type enum. - * @name google.cloud.security.privateca.v1.CertificateAuthority.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} SELF_SIGNED=1 SELF_SIGNED value - * @property {number} SUBORDINATE=2 SUBORDINATE value - */ - CertificateAuthority.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SELF_SIGNED"] = 1; - values[valuesById[2] = "SUBORDINATE"] = 2; - return values; - })(); - - /** - * State enum. - * @name google.cloud.security.privateca.v1.CertificateAuthority.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ENABLED=1 ENABLED value - * @property {number} DISABLED=2 DISABLED value - * @property {number} STAGED=3 STAGED value - * @property {number} AWAITING_USER_ACTIVATION=4 AWAITING_USER_ACTIVATION value - * @property {number} DELETED=5 DELETED value - */ - CertificateAuthority.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENABLED"] = 1; - values[valuesById[2] = "DISABLED"] = 2; - values[valuesById[3] = "STAGED"] = 3; - values[valuesById[4] = "AWAITING_USER_ACTIVATION"] = 4; - values[valuesById[5] = "DELETED"] = 5; - return values; - })(); - /** * SignHashAlgorithm enum. * @name google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm @@ -1714,6 +1714,22 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Tier enum. + * @name google.cloud.security.privateca.v1.CaPool.Tier + * @enum {number} + * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value + * @property {number} ENTERPRISE=1 ENTERPRISE value + * @property {number} DEVOPS=2 DEVOPS value + */ + CaPool.Tier = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENTERPRISE"] = 1; + values[valuesById[2] = "DEVOPS"] = 2; + return values; + })(); + CaPool.PublishingOptions = (function() { /** @@ -3190,22 +3206,6 @@ return IssuancePolicy; })(); - /** - * Tier enum. - * @name google.cloud.security.privateca.v1.CaPool.Tier - * @enum {number} - * @property {number} TIER_UNSPECIFIED=0 TIER_UNSPECIFIED value - * @property {number} ENTERPRISE=1 ENTERPRISE value - * @property {number} DEVOPS=2 DEVOPS value - */ - CaPool.Tier = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIER_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENTERPRISE"] = 1; - values[valuesById[2] = "DEVOPS"] = 2; - return values; - })(); - return CaPool; })(); @@ -37716,58 +37716,26 @@ */ var api = {}; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; - })(); - - api.ResourceDescriptor = (function() { + api.Http = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a Http. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37775,167 +37743,91 @@ } /** - * 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 + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.singular = ""; + Http.prototype.rules = $util.emptyArray; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + Http.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + 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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + 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.ResourceDescriptor(); + 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: - message.type = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); 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()); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -37946,667 +37838,114 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a Http message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + Http.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.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.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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); - 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; - } + 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 ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + 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 ResourceDescriptor to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + Http.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; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.string(); - break; - case 2: - message.childType = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - 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; - })(); + return Http; + })(); api.HttpRule = (function() { @@ -39281,6 +38620,667 @@ return CustomHttpPattern; })(); + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.childType = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResourceReference; + })(); + return api; })(); diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index c769426556f..e2067f2e2c0 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -51,7 +51,7 @@ "type": "google.protobuf.Duration", "id": 4, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "IMMUTABLE" } }, "keySpec": { @@ -150,6 +150,23 @@ } }, "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "SELF_SIGNED": 1, + "SUBORDINATE": 2 + } + }, + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ENABLED": 1, + "DISABLED": 2, + "STAGED": 3, + "AWAITING_USER_ACTIVATION": 4, + "DELETED": 5 + } + }, "AccessUrls": { "fields": { "caCertificateAccessUrl": { @@ -183,23 +200,6 @@ } } }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "SELF_SIGNED": 1, - "SUBORDINATE": 2 - } - }, - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ENABLED": 1, - "DISABLED": 2, - "STAGED": 3, - "AWAITING_USER_ACTIVATION": 4, - "DELETED": 5 - } - }, "SignHashAlgorithm": { "values": { "SIGN_HASH_ALGORITHM_UNSPECIFIED": 0, @@ -259,6 +259,13 @@ } }, "nested": { + "Tier": { + "values": { + "TIER_UNSPECIFIED": 0, + "ENTERPRISE": 1, + "DEVOPS": 2 + } + }, "PublishingOptions": { "fields": { "publishCaCert": { @@ -404,13 +411,6 @@ } } } - }, - "Tier": { - "values": { - "TIER_UNSPECIFIED": 0, - "ENTERPRISE": 1, - "DEVOPS": 2 - } } } }, @@ -5112,6 +5112,93 @@ "cc_enable_arenas": true }, "nested": { + "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 + } + } + }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -5207,93 +5294,6 @@ } } }, - "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", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js index ceaece45335..2f9711086b9 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js @@ -41,11 +41,11 @@ function main(parent, certificate) { * retry your request, the server will know to ignore the request if it has * already been completed. The server will guarantee that for at least 60 * minutes since the first request. - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). */ diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index e4c53af68be..8302f3f603b 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -630,11 +630,11 @@ export class CertificateAuthorityServiceClient { * already been completed. The server will guarantee that for at least 60 * minutes since the first request. * - * For example, consider a situation where you make an initial request and t - * he request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. * * The request ID must be a valid UUID with the exception that zero UUID is * not supported (00000000-0000-0000-0000-000000000000). From b819cee09ff56fb170b1307617fbffec086cadf3 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:28:42 +0000 Subject: [PATCH 083/113] docs(nodejs): version support policy edits (#1346) (#159) --- .../google-cloud-security-privateca/README.md | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index f9e30a2919b..a4825804e28 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -100,21 +100,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/security-private-ca@legacy-8` installs client libraries +for versions compatible with Node.js 8. ## Versioning From 41a1f8be08b00f886f6be570c7d8a25bceeda58e 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 18:50:59 +0000 Subject: [PATCH 084/113] docs(samples): include metadata file, add exclusions for samples to handwritten libraries (#160) - [ ] Regenerate this pull request now. 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 --- ..._service.activate_certificate_authority.js | 9 +- ...ficate_authority_service.create_ca_pool.js | 9 +- ...te_authority_service.create_certificate.js | 9 +- ...ty_service.create_certificate_authority.js | 9 +- ...ity_service.create_certificate_template.js | 9 +- ...ficate_authority_service.delete_ca_pool.js | 9 +- ...ty_service.delete_certificate_authority.js | 9 +- ...ity_service.delete_certificate_template.js | 9 +- ...y_service.disable_certificate_authority.js | 9 +- ...ty_service.enable_certificate_authority.js | 9 +- ...ficate_authority_service.fetch_ca_certs.js | 9 +- ...service.fetch_certificate_authority_csr.js | 9 +- ...rtificate_authority_service.get_ca_pool.js | 9 +- ...icate_authority_service.get_certificate.js | 9 +- ...ority_service.get_certificate_authority.js | 9 +- ...service.get_certificate_revocation_list.js | 9 +- ...hority_service.get_certificate_template.js | 9 +- ...ificate_authority_service.list_ca_pools.js | 9 +- ...ty_service.list_certificate_authorities.js | 9 +- ...rvice.list_certificate_revocation_lists.js | 9 +- ...rity_service.list_certificate_templates.js | 9 +- ...ate_authority_service.list_certificates.js | 9 +- ...te_authority_service.revoke_certificate.js | 9 +- ..._service.undelete_certificate_authority.js | 9 +- ...ficate_authority_service.update_ca_pool.js | 9 +- ...te_authority_service.update_certificate.js | 9 +- ...ty_service.update_certificate_authority.js | 9 +- ...vice.update_certificate_revocation_list.js | 9 +- ...ity_service.update_certificate_template.js | 9 +- ...ta.google.cloud.security.privateca.v1.json | 1403 +++++++++++++++++ ..._service.activate_certificate_authority.js | 9 +- ...te_authority_service.create_certificate.js | 9 +- ...ty_service.create_certificate_authority.js | 9 +- ...y_service.disable_certificate_authority.js | 9 +- ...ty_service.enable_certificate_authority.js | 9 +- ...service.fetch_certificate_authority_csr.js | 9 +- ...icate_authority_service.get_certificate.js | 9 +- ...ority_service.get_certificate_authority.js | 9 +- ...service.get_certificate_revocation_list.js | 9 +- ...e_authority_service.get_reusable_config.js | 9 +- ...ty_service.list_certificate_authorities.js | 9 +- ...rvice.list_certificate_revocation_lists.js | 9 +- ...ate_authority_service.list_certificates.js | 9 +- ...authority_service.list_reusable_configs.js | 9 +- ...y_service.restore_certificate_authority.js | 9 +- ...te_authority_service.revoke_certificate.js | 9 +- ...e.schedule_delete_certificate_authority.js | 9 +- ...te_authority_service.update_certificate.js | 9 +- ...ty_service.update_certificate_authority.js | 9 +- ...vice.update_certificate_revocation_list.js | 9 +- ...ogle.cloud.security.privateca.v1beta1.json | 963 +++++++++++ .../certificate_authority_service_client.ts | 5 +- .../certificate_authority_service_client.ts | 5 +- .../gapic_certificate_authority_service_v1.ts | 225 ++- ...c_certificate_authority_service_v1beta1.ts | 184 ++- 55 files changed, 3118 insertions(+), 108 deletions(-) create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json create mode 100644 packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js index aba8590eaa5..b42290196e6 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js index 518f17d618d..66013c3bc0e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.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-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js index 2f9711086b9..f99164bc2bb 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.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-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js index a9130d72cc2..ee51d7e7603 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js index d3762e8c05a..b719dbff004 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_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-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js index de7a3f87382..c106be891f0 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.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-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js index 6a84fef206d..37cfddf2f0f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js index b99d60ece44..ef9eb376005 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_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-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js index ee24b929855..ab2d1a16ca6 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js index 9cc57b97223..ea708a6a0ae 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js index 85885021a30..74ba7d64aed 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.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-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js index cde95d29f09..275da0dd28d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.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-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js index ba7728122e0..f1898615a9b 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js index 96aafda0342..5ba3f3909e8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js index aa0d321093c..5c42d6b4004 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js index 77749e234b4..9d2ca2a40d1 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js index 9e2aa035f29..3bbec5eb8b4 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_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-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js index 84828a333b3..803be8a3790 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js index 797e395a4cd..b6ab38d92be 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js index aac8c8994b8..92f4b33a980 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js index 12af5975da7..61c4b29e550 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js index 0ef68f09f2b..8d4b1525c5a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.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-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js index 376ef3e62d4..a4776a7824e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.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-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js index c74c1827b2b..72949fc4a30 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js index 3a547ad34d7..13c067ced0c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js index b116a7c70a9..590b914f6fe 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js index 139f8a4453e..850c80c4afa 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js index 6a8cd74e5a7..8c71f90a947 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js index 03be43d9986..727a169c958 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_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-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json new file mode 100644 index 00000000000..57b8e7c6d79 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -0,0 +1,1403 @@ +{ + "clientLibrary": { + "name": "nodejs-privateca", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.security.privateca.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async", + "title": "CertificateAuthorityService createCertificate Sample", + "origin": "API_DEFINITION", + "description": " Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.create_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 97, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1.Certificate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "issuing_certificate_authority_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_async", + "title": "CertificateAuthorityService getCertificate Sample", + "origin": "API_DEFINITION", + "description": " Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.get_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_async", + "title": "CertificateAuthorityService listCertificates Sample", + "origin": "API_DEFINITION", + "description": " Lists [Certificates][google.cloud.security.privateca.v1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.list_certificates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "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.security.privateca.v1.ListCertificatesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async", + "title": "CertificateAuthorityService revokeCertificate Sample", + "origin": "API_DEFINITION", + "description": " Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.revoke_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "reason", + "type": ".google.cloud.security.privateca.v1.RevocationReason" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async", + "title": "CertificateAuthorityService updateCertificate Sample", + "origin": "API_DEFINITION", + "description": " Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.", + "canonical": true, + "file": "certificate_authority_service.update_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "async": true, + "parameters": [ + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1.Certificate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", + "title": "CertificateAuthorityService activateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.", + "canonical": true, + "file": "certificate_authority_service.activate_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "pem_ca_certificate", + "type": "TYPE_STRING" + }, + { + "name": "subordinate_config", + "type": ".google.cloud.security.privateca.v1.SubordinateConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", + "title": "CertificateAuthorityService createCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.", + "canonical": true, + "file": "certificate_authority_service.create_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1.CertificateAuthority" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", + "title": "CertificateAuthorityService disableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.disable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", + "title": "CertificateAuthorityService enableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.enable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", + "title": "CertificateAuthorityService fetchCertificateAuthorityCsr Sample", + "origin": "API_DEFINITION", + "description": " Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.fetch_certificate_authority_csr.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async", + "title": "CertificateAuthorityService getCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CertificateAuthority", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", + "title": "CertificateAuthorityService listCertificateAuthorities Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_authorities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "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.security.privateca.v1.ListCertificateAuthoritiesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async", + "title": "CertificateAuthorityService undeleteCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.", + "canonical": true, + "file": "certificate_authority_service.undelete_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UndeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async", + "title": "CertificateAuthorityService deleteCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.delete_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "ignore_active_certificates", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", + "title": "CertificateAuthorityService updateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1.CertificateAuthority" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async", + "title": "CertificateAuthorityService createCaPool Sample", + "origin": "API_DEFINITION", + "description": " Create a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.create_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "ca_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "ca_pool", + "type": ".google.cloud.security.privateca.v1.CaPool" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async", + "title": "CertificateAuthorityService updateCaPool Sample", + "origin": "API_DEFINITION", + "description": " Update a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.update_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "async": true, + "parameters": [ + { + "name": "ca_pool", + "type": ".google.cloud.security.privateca.v1.CaPool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_async", + "title": "CertificateAuthorityService getCaPool Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.get_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CaPool", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_async", + "title": "CertificateAuthorityService listCaPools Sample", + "origin": "API_DEFINITION", + "description": " Lists [CaPools][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.list_ca_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCaPools", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "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.security.privateca.v1.ListCaPoolsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCaPools", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async", + "title": "CertificateAuthorityService deleteCaPool Sample", + "origin": "API_DEFINITION", + "description": " Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.delete_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DeleteCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async", + "title": "CertificateAuthorityService fetchCaCerts Sample", + "origin": "API_DEFINITION", + "description": " FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all ACTIVE [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources in the [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.fetch_ca_certs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchCaCerts", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "async": true, + "parameters": [ + { + "name": "ca_pool", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.FetchCaCertsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "FetchCaCerts", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", + "title": "CertificateAuthorityService getCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CertificateRevocationList", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", + "title": "CertificateAuthorityService listCertificateRevocationLists Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_revocation_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "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.security.privateca.v1.ListCertificateRevocationListsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", + "title": "CertificateAuthorityService updateCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "certificate_revocation_list", + "type": ".google.cloud.security.privateca.v1.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async", + "title": "CertificateAuthorityService createCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.", + "canonical": true, + "file": "certificate_authority_service.create_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_template_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate_template", + "type": ".google.cloud.security.privateca.v1.CertificateTemplate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async", + "title": "CertificateAuthorityService deleteCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.delete_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DeleteCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async", + "title": "CertificateAuthorityService getCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CertificateTemplate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async", + "title": "CertificateAuthorityService listCertificateTemplates Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_templates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateTemplates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "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.security.privateca.v1.ListCertificateTemplatesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateTemplates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async", + "title": "CertificateAuthorityService updateCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "certificate_template", + "type": ".google.cloud.security.privateca.v1.CertificateTemplate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js index d999eee029f..70d2932aeff 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js index ee439d40829..df83e0f9cec 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js index 34b71d0bb1d..eafbbda4004 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js index cf90d2c1548..8f61656f3eb 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js index 8866519e8a2..d6e053ad650 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js index 801163663b8..f4a09ffa48a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js index 23ce3f3e8a2..7bdaefb80b2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js index e260e29b53c..0f0642d3857 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js index b18f79b20e5..4e3aa98f65f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js index edd08dc7f06..52caa32cd07 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js index 3518e2ce115..73c847ec0c9 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js index 5200e8b1558..c101c2e7454 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js index ea675f65866..81c7c01e61e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js index cfc7e093138..479948db2bf 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js index a6699de42be..a6191a25744 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js index 37a37b1e67b..de0e716a00e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js index cf42fdb0a3f..22379e2c438 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js index 6eeaea6c0e3..faa3660239a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js index f9b56294c4a..bc4705328f2 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.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-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js index 28bbe52330d..44d5edbf2b0 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.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-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json new file mode 100644 index 00000000000..d9d2e453599 --- /dev/null +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -0,0 +1,963 @@ +{ + "clientLibrary": { + "name": "nodejs-privateca", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.security.privateca.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async", + "title": "CertificateAuthorityService createCertificate Sample", + "origin": "API_DEFINITION", + "description": " Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.create_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1beta1.Certificate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async", + "title": "CertificateAuthorityService getCertificate Sample", + "origin": "API_DEFINITION", + "description": " Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.get_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async", + "title": "CertificateAuthorityService listCertificates Sample", + "origin": "API_DEFINITION", + "description": " Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.list_certificates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "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.security.privateca.v1beta1.ListCertificatesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async", + "title": "CertificateAuthorityService revokeCertificate Sample", + "origin": "API_DEFINITION", + "description": " Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.revoke_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "reason", + "type": ".google.cloud.security.privateca.v1beta1.RevocationReason" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async", + "title": "CertificateAuthorityService updateCertificate Sample", + "origin": "API_DEFINITION", + "description": " Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field.", + "canonical": true, + "file": "certificate_authority_service.update_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "async": true, + "parameters": [ + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1beta1.Certificate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", + "title": "CertificateAuthorityService activateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.", + "canonical": true, + "file": "certificate_authority_service.activate_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "pem_ca_certificate", + "type": "TYPE_STRING" + }, + { + "name": "subordinate_config", + "type": ".google.cloud.security.privateca.v1beta1.SubordinateConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", + "title": "CertificateAuthorityService createCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.", + "canonical": true, + "file": "certificate_authority_service.create_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1beta1.CertificateAuthority" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", + "title": "CertificateAuthorityService disableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.disable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", + "title": "CertificateAuthorityService enableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.enable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", + "title": "CertificateAuthorityService fetchCertificateAuthorityCsr Sample", + "origin": "API_DEFINITION", + "description": " Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.fetch_certificate_authority_csr.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async", + "title": "CertificateAuthorityService getCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.CertificateAuthority", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", + "title": "CertificateAuthorityService listCertificateAuthorities Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_authorities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "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.security.privateca.v1beta1.ListCertificateAuthoritiesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async", + "title": "CertificateAuthorityService restoreCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.", + "canonical": true, + "file": "certificate_authority_service.restore_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "RestoreCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async", + "title": "CertificateAuthorityService scheduleDeleteCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.", + "canonical": true, + "file": "certificate_authority_service.schedule_delete_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ScheduleDeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ScheduleDeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", + "title": "CertificateAuthorityService updateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1beta1.CertificateAuthority" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", + "title": "CertificateAuthorityService getCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.CertificateRevocationList", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", + "title": "CertificateAuthorityService listCertificateRevocationLists Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_revocation_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "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.security.privateca.v1beta1.ListCertificateRevocationListsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", + "title": "CertificateAuthorityService updateCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "certificate_revocation_list", + "type": ".google.cloud.security.privateca.v1beta1.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async", + "title": "CertificateAuthorityService getReusableConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].", + "canonical": true, + "file": "certificate_authority_service.get_reusable_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReusableConfig", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.ReusableConfig", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetReusableConfig", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + }, + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async", + "title": "CertificateAuthorityService listReusableConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].", + "canonical": true, + "file": "certificate_authority_service.list_reusable_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReusableConfigs", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "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.security.privateca.v1beta1.ListReusableConfigsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListReusableConfigs", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } + } + ] +} diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 8302f3f603b..569798c1ef4 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -5675,9 +5675,8 @@ export class CertificateAuthorityServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.certificateAuthorityServiceStub!.then(stub => { + if (this.certificateAuthorityServiceStub && !this._terminated) { + return this.certificateAuthorityServiceStub.then(stub => { this._terminated = true; stub.close(); this.iamClient.close(); diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index fb46daf7a00..97fb5c372e7 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -3872,9 +3872,8 @@ export class CertificateAuthorityServiceClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.certificateAuthorityServiceStub!.then(stub => { + if (this.certificateAuthorityServiceStub && !this._terminated) { + return this.certificateAuthorityServiceStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 4958cdd0599..7faa10b19fe 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -202,7 +202,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { assert(client.certificateAuthorityServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( { @@ -210,7 +210,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.close(); + client.initialize(); + assert(client.certificateAuthorityServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -371,6 +389,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCertificate(request), expectedError); + }); }); describe('getCertificate', () => { @@ -491,6 +528,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCertificate(request), expectedError); + }); }); describe('revokeCertificate', () => { @@ -611,6 +667,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes revokeCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.revokeCertificate(request), expectedError); + }); }); describe('updateCertificate', () => { @@ -734,6 +809,26 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCertificate(request), expectedError); + }); }); describe('fetchCertificateAuthorityCsr', () => { @@ -858,6 +953,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes fetchCertificateAuthorityCsr with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.fetchCertificateAuthorityCsr(request), + expectedError + ); + }); }); describe('getCertificateAuthority', () => { @@ -982,6 +1099,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificateAuthority with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getCertificateAuthority(request), + expectedError + ); + }); }); describe('getCaPool', () => { @@ -1099,6 +1238,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCaPool with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCaPool(request), expectedError); + }); }); describe('fetchCaCerts', () => { @@ -1219,6 +1377,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes fetchCaCerts with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() + ); + request.caPool = ''; + const expectedHeaderRequestParams = 'ca_pool='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchCaCerts(request), expectedError); + }); }); describe('getCertificateRevocationList', () => { @@ -1343,6 +1520,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificateRevocationList with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getCertificateRevocationList(request), + expectedError + ); + }); }); describe('getCertificateTemplate', () => { @@ -1467,6 +1666,28 @@ describe('v1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificateTemplate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getCertificateTemplate(request), + expectedError + ); + }); }); describe('activateCertificateAuthority', () => { diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 134d4a68a9f..0d21dc85a78 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -196,7 +196,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { assert(client.certificateAuthorityServiceStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( { @@ -204,7 +204,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { projectId: 'bogus', } ); - client.close(); + client.initialize(); + assert(client.certificateAuthorityServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -365,6 +383,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCertificate(request), expectedError); + }); }); describe('getCertificate', () => { @@ -485,6 +522,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCertificate(request), expectedError); + }); }); describe('revokeCertificate', () => { @@ -605,6 +661,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes revokeCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.revokeCertificate(request), expectedError); + }); }); describe('updateCertificate', () => { @@ -728,6 +803,26 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateCertificate with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() + ); + request.certificate = {}; + request.certificate.name = ''; + const expectedHeaderRequestParams = 'certificate.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCertificate(request), expectedError); + }); }); describe('fetchCertificateAuthorityCsr', () => { @@ -852,6 +947,28 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes fetchCertificateAuthorityCsr with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.fetchCertificateAuthorityCsr(request), + expectedError + ); + }); }); describe('getCertificateAuthority', () => { @@ -976,6 +1093,28 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificateAuthority with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getCertificateAuthority(request), + expectedError + ); + }); }); describe('getCertificateRevocationList', () => { @@ -1100,6 +1239,28 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getCertificateRevocationList with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getCertificateRevocationList(request), + expectedError + ); + }); }); describe('getReusableConfig', () => { @@ -1220,6 +1381,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getReusableConfig with closed client', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReusableConfig(request), expectedError); + }); }); describe('activateCertificateAuthority', () => { From fd15e923fed013c6f244ab2365a453a7a2df1ea4 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 14 Mar 2022 12:31:34 -0700 Subject: [PATCH 085/113] feat: Add `skip_grace_period` flag to DeleteCertificateAuthority API (#164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add `skip_grace_period` flag to DeleteCertificateAuthority API PiperOrigin-RevId: 433526535 Source-Link: https://github.com/googleapis/googleapis/commit/6c2eceaaada54ce7381ad54a671eafd64b9b0088 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0ce00549adc2c0b5e6c9b284be7aa1b7dd1e5460 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMGNlMDA1NDlhZGMyYzBiNWU2YzliMjg0YmU3YWExYjdkZDFlNTQ2MCJ9 * 🦉 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: Owl Bot --- .../security/privateca/v1/resources.proto | 1 - .../cloud/security/privateca/v1/service.proto | 6 +- .../protos/protos.d.ts | 506 ++--- .../protos/protos.js | 1834 +++++++++-------- .../protos/protos.json | 181 +- ...ty_service.delete_certificate_authority.js | 6 + ...ta.google.cloud.security.privateca.v1.json | 6 +- .../certificate_authority_service_client.ts | 4 + 8 files changed, 1298 insertions(+), 1246 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto index 2eaa1c8a082..3f6dfb17110 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/resources.proto @@ -16,7 +16,6 @@ syntax = "proto3"; package google.cloud.security.privateca.v1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto index 4dcfc4f068c..2ab59538323 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1/service.proto @@ -22,7 +22,6 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/security/privateca/v1/resources.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -796,6 +795,11 @@ message DeleteCertificateAuthorityRequest { // Optional. This field allows the CA to be deleted even if the CA has // active certs. Active certs include both unrevoked and unexpired certs. bool ignore_active_certificates = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If this flag is set, the Certificate Authority will be deleted as soon as + // possible without a 30-day grace period where undeletion would have been + // allowed. If you proceed, there will be no way to recover this CA. + bool skip_grace_period = 5 [(google.api.field_behavior) = OPTIONAL]; } // Request message for diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index c3f61e5a26b..a43d9df3aa2 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/protos/protos.d.ts @@ -6293,6 +6293,9 @@ export namespace google { /** DeleteCertificateAuthorityRequest ignoreActiveCertificates */ ignoreActiveCertificates?: (boolean|null); + + /** DeleteCertificateAuthorityRequest skipGracePeriod */ + skipGracePeriod?: (boolean|null); } /** Represents a DeleteCertificateAuthorityRequest. */ @@ -6313,6 +6316,9 @@ export namespace google { /** DeleteCertificateAuthorityRequest ignoreActiveCertificates. */ public ignoreActiveCertificates: boolean; + /** DeleteCertificateAuthorityRequest skipGracePeriod. */ + public skipGracePeriod: boolean; + /** * Creates a new DeleteCertificateAuthorityRequest instance using the specified properties. * @param [properties] Properties to set @@ -15272,6 +15278,256 @@ export namespace google { /** Namespace api. */ namespace api { + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Http. */ interface IHttp { @@ -15610,256 +15866,6 @@ export namespace google { */ public toJSON(): { [k: string]: any }; } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } /** Namespace protobuf. */ diff --git a/packages/google-cloud-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index 72e003e1194..a7c180f6ca9 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -15630,6 +15630,7 @@ * @property {string|null} [name] DeleteCertificateAuthorityRequest name * @property {string|null} [requestId] DeleteCertificateAuthorityRequest requestId * @property {boolean|null} [ignoreActiveCertificates] DeleteCertificateAuthorityRequest ignoreActiveCertificates + * @property {boolean|null} [skipGracePeriod] DeleteCertificateAuthorityRequest skipGracePeriod */ /** @@ -15671,6 +15672,14 @@ */ DeleteCertificateAuthorityRequest.prototype.ignoreActiveCertificates = false; + /** + * DeleteCertificateAuthorityRequest skipGracePeriod. + * @member {boolean} skipGracePeriod + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @instance + */ + DeleteCertificateAuthorityRequest.prototype.skipGracePeriod = false; + /** * Creates a new DeleteCertificateAuthorityRequest instance using the specified properties. * @function create @@ -15701,6 +15710,8 @@ writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); if (message.ignoreActiveCertificates != null && Object.hasOwnProperty.call(message, "ignoreActiveCertificates")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ignoreActiveCertificates); + if (message.skipGracePeriod != null && Object.hasOwnProperty.call(message, "skipGracePeriod")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipGracePeriod); return writer; }; @@ -15744,6 +15755,9 @@ case 4: message.ignoreActiveCertificates = reader.bool(); break; + case 5: + message.skipGracePeriod = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -15788,6 +15802,9 @@ if (message.ignoreActiveCertificates != null && message.hasOwnProperty("ignoreActiveCertificates")) if (typeof message.ignoreActiveCertificates !== "boolean") return "ignoreActiveCertificates: boolean expected"; + if (message.skipGracePeriod != null && message.hasOwnProperty("skipGracePeriod")) + if (typeof message.skipGracePeriod !== "boolean") + return "skipGracePeriod: boolean expected"; return null; }; @@ -15809,6 +15826,8 @@ message.requestId = String(object.requestId); if (object.ignoreActiveCertificates != null) message.ignoreActiveCertificates = Boolean(object.ignoreActiveCertificates); + if (object.skipGracePeriod != null) + message.skipGracePeriod = Boolean(object.skipGracePeriod); return message; }; @@ -15829,6 +15848,7 @@ object.name = ""; object.requestId = ""; object.ignoreActiveCertificates = false; + object.skipGracePeriod = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -15836,6 +15856,8 @@ object.requestId = message.requestId; if (message.ignoreActiveCertificates != null && message.hasOwnProperty("ignoreActiveCertificates")) object.ignoreActiveCertificates = message.ignoreActiveCertificates; + if (message.skipGracePeriod != null && message.hasOwnProperty("skipGracePeriod")) + object.skipGracePeriod = message.skipGracePeriod; return object; }; @@ -37716,26 +37738,58 @@ */ var api = {}; - api.Http = (function() { + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.ResourceDescriptor = (function() { /** - * Properties of a Http. + * Properties of a ResourceDescriptor. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new Http. + * Constructs a new ResourceDescriptor. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + 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) @@ -37743,91 +37797,167 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.rules = $util.emptyArray; + ResourceDescriptor.prototype.type = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a new Http instance using the specified properties. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - Http.create = function create(properties) { - return new Http(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + ResourceDescriptor.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); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + 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.Http(); + 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: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.type = reader.string(); break; case 2: - message.fullyDecodeReservedExpansion = reader.bool(); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + case 3: + message.nameField = reader.string(); + break; + case 4: + message.history = reader.int32(); + break; + case 5: + message.plural = reader.string(); + break; + case 6: + message.singular = reader.string(); + break; + case 10: + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); break; default: reader.skipType(tag & 7); @@ -37838,353 +37968,335 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + ResourceDescriptor.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.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.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 (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } } - 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. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.Http} message Http + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + ResourceDescriptor.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 (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this Http to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + ResourceDescriptor.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|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance + * 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 */ - HttpRule.prototype.post = null; + 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; + })(); /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance + * 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 */ - HttpRule.prototype["delete"] = null; + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; + return ResourceDescriptor; + })(); - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; + api.ResourceReference = (function() { /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set */ - HttpRule.prototype.responseBody = ""; + 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]]; + } /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ResourceReference.prototype.type = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + ResourceReference.prototype.childType = ""; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new ResourceReference instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + ResourceReference.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); + 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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a ResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + 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.HttpRule(); + 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.selector = reader.string(); + message.type = 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())); + message.childType = reader.string(); break; default: reader.skipType(tag & 7); @@ -38195,240 +38307,118 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + ResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a ResourceReference 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 + * @memberof google.api.ResourceReference * @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]); - } - } + * @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 HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + ResourceReference.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); + object.type = ""; + object.childType = ""; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; + 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 HttpRule to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + return ResourceReference; })(); - api.CustomHttpPattern = (function() { + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38436,88 +38426,91 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * Creates a new Http instance using the specified properties. * @function create - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + Http.create = function create(properties) { + return new Http(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + Http.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); + 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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IHttp} message Http message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + Http.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a Http message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + 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.CustomHttpPattern(); + 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: - message.kind = reader.string(); + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); break; case 2: - message.path = reader.string(); + message.fullyDecodeReservedExpansion = reader.bool(); break; default: reader.skipType(tag & 7); @@ -38528,150 +38521,143 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a Http message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + Http.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a Http message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + Http.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"; + 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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); + 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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + 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.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @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 ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -38679,167 +38665,209 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.put = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.post = null; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype["delete"] = null; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.patch = null; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + HttpRule.prototype.custom = null; /** - * Creates a new ResourceDescriptor instance using the specified properties. + * 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.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } + 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 ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceDescriptor + * @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.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decode = function decode(reader, length) { + 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.ResourceDescriptor(); + 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.type = reader.string(); + message.selector = reader.string(); break; case 2: - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); + message.get = reader.string(); break; case 3: - message.nameField = reader.string(); + message.put = reader.string(); break; case 4: - message.history = reader.int32(); + message.post = reader.string(); break; case 5: - message.plural = reader.string(); + message["delete"] = reader.string(); break; case 6: - message.singular = reader.string(); + message.patch = 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()); + 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); @@ -38850,246 +38878,240 @@ }; /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * Decodes a HttpRule message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + HttpRule.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceDescriptor message. + * Verifies a HttpRule message. * @function verify - * @memberof google.api.ResourceDescriptor + * @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 */ - ResourceDescriptor.verify = function verify(message) { + HttpRule.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"; + 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.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.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; } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) 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; + 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.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + 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 ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; + 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 (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; } - 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.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; } - 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; - 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]; + 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 ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.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; - })(); - - /** - * 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; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39097,88 +39119,88 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + CustomHttpPattern.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); + 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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + 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.ResourceReference(); + 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.type = reader.string(); + message.kind = reader.string(); break; case 2: - message.childType = reader.string(); + message.path = reader.string(); break; default: reader.skipType(tag & 7); @@ -39189,96 +39211,96 @@ }; /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceReference message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.ResourceReference + * @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 */ - ResourceReference.verify = function verify(message) { + CustomHttpPattern.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"; + 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) 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); + 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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; + return CustomHttpPattern; })(); return api; diff --git a/packages/google-cloud-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index e2067f2e2c0..1905272caaa 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -2355,6 +2355,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "skipGracePeriod": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -5112,93 +5119,6 @@ "cc_enable_arenas": true }, "nested": { - "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 - } - } - }, "fieldBehavior": { "rule": "repeated", "type": "google.api.FieldBehavior", @@ -5294,6 +5214,93 @@ } } }, + "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", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js index 37cfddf2f0f..766bc26f954 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js @@ -49,6 +49,12 @@ function main(name) { * active certs. Active certs include both unrevoked and unexpired certs. */ // const ignoreActiveCertificates = true + /** + * Optional. If this flag is set, the Certificate Authority will be deleted as soon as + * possible without a 30-day grace period where undeletion would have been + * allowed. If you proceed, there will be no way to recover this CA. + */ + // const skipGracePeriod = true // Imports the Privateca library const {CertificateAuthorityServiceClient} = require('@google-cloud/security-private-ca').v1; diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index 57b8e7c6d79..b27fdf40536 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -646,7 +646,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 77, "type": "FULL" } ], @@ -666,6 +666,10 @@ { "name": "ignore_active_certificates", "type": "TYPE_BOOL" + }, + { + "name": "skip_grace_period", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 569798c1ef4..16ecd81684c 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -2512,6 +2512,10 @@ export class CertificateAuthorityServiceClient { * @param {boolean} [request.ignoreActiveCertificates] * Optional. This field allows the CA to be deleted even if the CA has * active certs. Active certs include both unrevoked and unexpired certs. + * @param {boolean} [request.skipGracePeriod] + * Optional. If this flag is set, the Certificate Authority will be deleted as soon as + * possible without a 30-day grace period where undeletion would have been + * allowed. If you proceed, there will be no way to recover this CA. * @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. From 698feadbc925dfd35f958d182c5dbdeef6335671 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:38:23 +0000 Subject: [PATCH 086/113] chore: update v2.14.2 gapic-generator-typescript (#166) - [ ] 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_certificate_authority_service_v1.ts | 10 ---------- .../gapic_certificate_authority_service_v1beta1.ts | 8 -------- 2 files changed, 18 deletions(-) diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 7faa10b19fe..ab5cf4f64a7 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -403,7 +403,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createCertificate(request), expectedError); @@ -542,7 +541,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCertificate(request), expectedError); @@ -681,7 +679,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.revokeCertificate(request), expectedError); @@ -824,7 +821,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificate = {}; request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateCertificate(request), expectedError); @@ -967,7 +963,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1113,7 +1108,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1252,7 +1246,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCaPool(request), expectedError); @@ -1391,7 +1384,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); request.caPool = ''; - const expectedHeaderRequestParams = 'ca_pool='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchCaCerts(request), expectedError); @@ -1534,7 +1526,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1680,7 +1671,6 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 0d21dc85a78..2ebbaba6b1c 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -397,7 +397,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); request.parent = ''; - const expectedHeaderRequestParams = 'parent='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createCertificate(request), expectedError); @@ -536,7 +535,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCertificate(request), expectedError); @@ -675,7 +673,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.revokeCertificate(request), expectedError); @@ -818,7 +815,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificate = {}; request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateCertificate(request), expectedError); @@ -961,7 +957,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1107,7 +1102,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1253,7 +1247,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1395,7 +1388,6 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); request.name = ''; - const expectedHeaderRequestParams = 'name='; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getReusableConfig(request), expectedError); From 5782917a3d56fbe124ee849de2ce7d6c5031e2f7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 23 Mar 2022 21:32:37 +0000 Subject: [PATCH 087/113] chore(main): release 3.1.0 (#165) :robot: I have created a release *beep* *boop* --- ## [3.1.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v3.0.0...v3.1.0) (2022-03-16) ### Features * Add `skip_grace_period` flag to DeleteCertificateAuthority API ([#164](https://github.com/googleapis/nodejs-security-private-ca/issues/164)) ([7dcc0fc](https://github.com/googleapis/nodejs-security-private-ca/commit/7dcc0fcc59bbaf2e472b36ccef8b3529de5bd976)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 062e5edc83c..45977f8123d 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v3.0.0...v3.1.0) (2022-03-16) + + +### Features + +* Add `skip_grace_period` flag to DeleteCertificateAuthority API ([#164](https://github.com/googleapis/nodejs-security-private-ca/issues/164)) ([7dcc0fc](https://github.com/googleapis/nodejs-security-private-ca/commit/7dcc0fcc59bbaf2e472b36ccef8b3529de5bd976)) + ## [3.0.0](https://www.github.com/googleapis/nodejs-security-private-ca/compare/v2.5.0...v3.0.0) (2021-11-26) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 9ddd3f253ed..c09cce4ffc7 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "3.0.0", + "version": "3.1.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index e8be4e439f8..867e1f303a4 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^3.0.0" + "@google-cloud/security-private-ca": "^3.1.0" }, "devDependencies": { "c8": "^7.1.0", From ab607c23ca2943f3593ccdc47fb5d13f5a6b7139 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 20 Apr 2022 12:32:46 -0700 Subject: [PATCH 088/113] build(node): update client library version in samples metadata (#1356) (#173) * 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 --- ...ta.google.cloud.security.privateca.v1.json | 2696 ++++++++--------- ...ogle.cloud.security.privateca.v1beta1.json | 1844 +++++------ 2 files changed, 2270 insertions(+), 2270 deletions(-) diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index b27fdf40536..b965341c0fc 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,1407 +1,1407 @@ { - "clientLibrary": { - "name": "nodejs-privateca", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.security.privateca.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async", - "title": "CertificateAuthorityService createCertificate Sample", - "origin": "API_DEFINITION", - "description": " Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.create_certificate.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 97, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "certificate_id", - "type": "TYPE_STRING" - }, - { - "name": "certificate", - "type": ".google.cloud.security.privateca.v1.Certificate" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "validate_only", - "type": "TYPE_BOOL" - }, - { - "name": "issuing_certificate_authority_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" - }, - "method": { - "shortName": "CreateCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } + "clientLibrary": { + "name": "nodejs-privateca", + "version": "3.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.security.privateca.v1", + "version": "v1" + } + ] }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_async", - "title": "CertificateAuthorityService getCertificate Sample", - "origin": "API_DEFINITION", - "description": " Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].", - "canonical": true, - "file": "certificate_authority_service.get_certificate.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificate_async", + "title": "CertificateAuthorityService createCertificate Sample", + "origin": "API_DEFINITION", + "description": " Create a new [Certificate][google.cloud.security.privateca.v1.Certificate] in a given Project, Location from a particular [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.create_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 97, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1.Certificate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "validate_only", + "type": "TYPE_BOOL" + }, + { + "name": "issuing_certificate_authority_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_async", - "title": "CertificateAuthorityService listCertificates Sample", - "origin": "API_DEFINITION", - "description": " Lists [Certificates][google.cloud.security.privateca.v1.Certificate].", - "canonical": true, - "file": "certificate_authority_service.list_certificates.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificates", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", - "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.security.privateca.v1.ListCertificatesResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificate_async", + "title": "CertificateAuthorityService getCertificate Sample", + "origin": "API_DEFINITION", + "description": " Returns a [Certificate][google.cloud.security.privateca.v1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.get_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificates", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async", - "title": "CertificateAuthorityService revokeCertificate Sample", - "origin": "API_DEFINITION", - "description": " Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].", - "canonical": true, - "file": "certificate_authority_service.revoke_certificate.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 71, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RevokeCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "reason", - "type": ".google.cloud.security.privateca.v1.RevocationReason" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificates_async", + "title": "CertificateAuthorityService listCertificates Sample", + "origin": "API_DEFINITION", + "description": " Lists [Certificates][google.cloud.security.privateca.v1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.list_certificates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "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.security.privateca.v1.ListCertificatesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificates", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "RevokeCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async", - "title": "CertificateAuthorityService updateCertificate Sample", - "origin": "API_DEFINITION", - "description": " Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.", - "canonical": true, - "file": "certificate_authority_service.update_certificate.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", - "async": true, - "parameters": [ - { - "name": "certificate", - "type": ".google.cloud.security.privateca.v1.Certificate" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_async", + "title": "CertificateAuthorityService revokeCertificate Sample", + "origin": "API_DEFINITION", + "description": " Revoke a [Certificate][google.cloud.security.privateca.v1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.revoke_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "reason", + "type": ".google.cloud.security.privateca.v1.RevocationReason" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.RevokeCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", - "title": "CertificateAuthorityService activateCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.", - "canonical": true, - "file": "certificate_authority_service.activate_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ActivateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "pem_ca_certificate", - "type": "TYPE_STRING" - }, - { - "name": "subordinate_config", - "type": ".google.cloud.security.privateca.v1.SubordinateConfig" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_async", + "title": "CertificateAuthorityService updateCertificate Sample", + "origin": "API_DEFINITION", + "description": " Update a [Certificate][google.cloud.security.privateca.v1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1.Certificate.labels] field.", + "canonical": true, + "file": "certificate_authority_service.update_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "async": true, + "parameters": [ + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1.Certificate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ActivateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", - "title": "CertificateAuthorityService createCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.", - "canonical": true, - "file": "certificate_authority_service.create_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "certificate_authority_id", - "type": "TYPE_STRING" - }, - { - "name": "certificate_authority", - "type": ".google.cloud.security.privateca.v1.CertificateAuthority" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", + "title": "CertificateAuthorityService activateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Activate a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.", + "canonical": true, + "file": "certificate_authority_service.activate_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "pem_ca_certificate", + "type": "TYPE_STRING" + }, + { + "name": "subordinate_config", + "type": ".google.cloud.security.privateca.v1.SubordinateConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "CreateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", - "title": "CertificateAuthorityService disableCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.disable_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DisableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", + "title": "CertificateAuthorityService createCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Create a new [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in a given Project and Location.", + "canonical": true, + "file": "certificate_authority_service.create_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1.CertificateAuthority" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "DisableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", - "title": "CertificateAuthorityService enableCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.enable_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "EnableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", + "title": "CertificateAuthorityService disableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Disable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.disable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "EnableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", - "title": "CertificateAuthorityService fetchCertificateAuthorityCsr Sample", - "origin": "API_DEFINITION", - "description": " Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.fetch_certificate_authority_csr.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchCertificateAuthorityCsr", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", + "title": "CertificateAuthorityService enableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Enable a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.enable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "FetchCertificateAuthorityCsr", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async", - "title": "CertificateAuthorityService getCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.get_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.CertificateAuthority", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", + "title": "CertificateAuthorityService fetchCertificateAuthorityCsr Sample", + "origin": "API_DEFINITION", + "description": " Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that is in state [AWAITING_USER_ACTIVATION][google.cloud.security.privateca.v1.CertificateAuthority.State.AWAITING_USER_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.ActivateCertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.fetch_certificate_authority_csr.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", - "title": "CertificateAuthorityService listCertificateAuthorities Sample", - "origin": "API_DEFINITION", - "description": " Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.list_certificate_authorities.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificateAuthorities", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", - "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.security.privateca.v1.ListCertificateAuthoritiesResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_async", + "title": "CertificateAuthorityService getCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CertificateAuthority", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificateAuthorities", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async", - "title": "CertificateAuthorityService undeleteCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.", - "canonical": true, - "file": "certificate_authority_service.undelete_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UndeleteCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", + "title": "CertificateAuthorityService listCertificateAuthorities Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_authorities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "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.security.privateca.v1.ListCertificateAuthoritiesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UndeleteCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async", - "title": "CertificateAuthorityService deleteCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.delete_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - }, - { - "name": "ignore_active_certificates", - "type": "TYPE_BOOL" - }, - { - "name": "skip_grace_period", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_async", + "title": "CertificateAuthorityService undeleteCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Undelete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that has been deleted.", + "canonical": true, + "file": "certificate_authority_service.undelete_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UndeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UndeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "DeleteCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", - "title": "CertificateAuthorityService updateCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.update_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "certificate_authority", - "type": ".google.cloud.security.privateca.v1.CertificateAuthority" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_async", + "title": "CertificateAuthorityService deleteCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Delete a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.delete_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + }, + { + "name": "ignore_active_certificates", + "type": "TYPE_BOOL" + }, + { + "name": "skip_grace_period", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async", - "title": "CertificateAuthorityService createCaPool Sample", - "origin": "API_DEFINITION", - "description": " Create a [CaPool][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.create_ca_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 77, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "ca_pool_id", - "type": "TYPE_STRING" - }, - { - "name": "ca_pool", - "type": ".google.cloud.security.privateca.v1.CaPool" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", + "title": "CertificateAuthorityService updateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1.CertificateAuthority" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "CreateCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async", - "title": "CertificateAuthorityService updateCaPool Sample", - "origin": "API_DEFINITION", - "description": " Update a [CaPool][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.update_ca_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", - "async": true, - "parameters": [ - { - "name": "ca_pool", - "type": ".google.cloud.security.privateca.v1.CaPool" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCaPool_async", + "title": "CertificateAuthorityService createCaPool Sample", + "origin": "API_DEFINITION", + "description": " Create a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.create_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 77, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "ca_pool_id", + "type": "TYPE_STRING" + }, + { + "name": "ca_pool", + "type": ".google.cloud.security.privateca.v1.CaPool" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_async", - "title": "CertificateAuthorityService getCaPool Sample", - "origin": "API_DEFINITION", - "description": " Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.get_ca_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.CaPool", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_async", + "title": "CertificateAuthorityService updateCaPool Sample", + "origin": "API_DEFINITION", + "description": " Update a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.update_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "async": true, + "parameters": [ + { + "name": "ca_pool", + "type": ".google.cloud.security.privateca.v1.CaPool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_async", - "title": "CertificateAuthorityService listCaPools Sample", - "origin": "API_DEFINITION", - "description": " Lists [CaPools][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.list_ca_pools.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCaPools", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", - "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.security.privateca.v1.ListCaPoolsResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCaPool_async", + "title": "CertificateAuthorityService getCaPool Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.get_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CaPool", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCaPools", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async", - "title": "CertificateAuthorityService deleteCaPool Sample", - "origin": "API_DEFINITION", - "description": " Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.delete_ca_pool.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCaPools_async", + "title": "CertificateAuthorityService listCaPools Sample", + "origin": "API_DEFINITION", + "description": " Lists [CaPools][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.list_ca_pools.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCaPools", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "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.security.privateca.v1.ListCaPoolsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCaPools", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCaPools", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "DeleteCaPool", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async", - "title": "CertificateAuthorityService fetchCaCerts Sample", - "origin": "API_DEFINITION", - "description": " FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all ACTIVE [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources in the [CaPool][google.cloud.security.privateca.v1.CaPool].", - "canonical": true, - "file": "certificate_authority_service.fetch_ca_certs.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchCaCerts", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", - "async": true, - "parameters": [ - { - "name": "ca_pool", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.FetchCaCertsResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_async", + "title": "CertificateAuthorityService deleteCaPool Sample", + "origin": "API_DEFINITION", + "description": " Delete a [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.delete_ca_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DeleteCaPool", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCaPool", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "FetchCaCerts", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", - "title": "CertificateAuthorityService getCertificateRevocationList Sample", - "origin": "API_DEFINITION", - "description": " Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].", - "canonical": true, - "file": "certificate_authority_service.get_certificate_revocation_list.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.CertificateRevocationList", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_async", + "title": "CertificateAuthorityService fetchCaCerts Sample", + "origin": "API_DEFINITION", + "description": " FetchCaCerts returns the current trust anchor for the [CaPool][google.cloud.security.privateca.v1.CaPool]. This will include CA certificate chains for all ACTIVE [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources in the [CaPool][google.cloud.security.privateca.v1.CaPool].", + "canonical": true, + "file": "certificate_authority_service.fetch_ca_certs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchCaCerts", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "async": true, + "parameters": [ + { + "name": "ca_pool", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.FetchCaCertsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "FetchCaCerts", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.FetchCaCerts", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", - "title": "CertificateAuthorityService listCertificateRevocationLists Sample", - "origin": "API_DEFINITION", - "description": " Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].", - "canonical": true, - "file": "certificate_authority_service.list_certificate_revocation_lists.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificateRevocationLists", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", - "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.security.privateca.v1.ListCertificateRevocationListsResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", + "title": "CertificateAuthorityService getCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CertificateRevocationList", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificateRevocationLists", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", - "title": "CertificateAuthorityService updateCertificateRevocationList Sample", - "origin": "API_DEFINITION", - "description": " Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].", - "canonical": true, - "file": "certificate_authority_service.update_certificate_revocation_list.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", - "async": true, - "parameters": [ - { - "name": "certificate_revocation_list", - "type": ".google.cloud.security.privateca.v1.CertificateRevocationList" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", + "title": "CertificateAuthorityService listCertificateRevocationLists Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateRevocationLists][google.cloud.security.privateca.v1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_revocation_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "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.security.privateca.v1.ListCertificateRevocationListsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async", - "title": "CertificateAuthorityService createCertificateTemplate Sample", - "origin": "API_DEFINITION", - "description": " Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.", - "canonical": true, - "file": "certificate_authority_service.create_certificate_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "certificate_template_id", - "type": "TYPE_STRING" - }, - { - "name": "certificate_template", - "type": ".google.cloud.security.privateca.v1.CertificateTemplate" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", + "title": "CertificateAuthorityService updateCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "certificate_revocation_list", + "type": ".google.cloud.security.privateca.v1.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "CreateCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async", - "title": "CertificateAuthorityService deleteCertificateTemplate Sample", - "origin": "API_DEFINITION", - "description": " DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", - "canonical": true, - "file": "certificate_authority_service.delete_certificate_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_async", + "title": "CertificateAuthorityService createCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " Create a new [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in a given Project and Location.", + "canonical": true, + "file": "certificate_authority_service.create_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_template_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate_template", + "type": ".google.cloud.security.privateca.v1.CertificateTemplate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.CreateCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "DeleteCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async", - "title": "CertificateAuthorityService getCertificateTemplate Sample", - "origin": "API_DEFINITION", - "description": " Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", - "canonical": true, - "file": "certificate_authority_service.get_certificate_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1.CertificateTemplate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_async", + "title": "CertificateAuthorityService deleteCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " DeleteCertificateTemplate deletes a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.delete_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DeleteCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.DeleteCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async", - "title": "CertificateAuthorityService listCertificateTemplates Sample", - "origin": "API_DEFINITION", - "description": " Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].", - "canonical": true, - "file": "certificate_authority_service.list_certificate_templates.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificateTemplates", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", - "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.security.privateca.v1.ListCertificateTemplatesResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_async", + "title": "CertificateAuthorityService getCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1.CertificateTemplate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.GetCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificateTemplates", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async", - "title": "CertificateAuthorityService updateCertificateTemplate Sample", - "origin": "API_DEFINITION", - "description": " Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", - "canonical": true, - "file": "certificate_authority_service.update_certificate_template.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", - "async": true, - "parameters": [ - { - "name": "certificate_template", - "type": ".google.cloud.security.privateca.v1.CertificateTemplate" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_async", + "title": "CertificateAuthorityService listCertificateTemplates Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateTemplates][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_templates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateTemplates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "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.security.privateca.v1.ListCertificateTemplatesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateTemplates", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.ListCertificateTemplates", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificateTemplate", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" - } + { + "regionTag": "privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_async", + "title": "CertificateAuthorityService updateCertificateTemplate Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_template.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "async": true, + "parameters": [ + { + "name": "certificate_template", + "type": ".google.cloud.security.privateca.v1.CertificateTemplate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateTemplate", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService.UpdateCertificateTemplate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1.CertificateAuthorityService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index d9d2e453599..3b24854faab 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,963 +1,963 @@ { - "clientLibrary": { - "name": "nodejs-privateca", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.security.privateca.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async", - "title": "CertificateAuthorityService createCertificate Sample", - "origin": "API_DEFINITION", - "description": " Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.create_certificate.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "certificate_id", - "type": "TYPE_STRING" - }, - { - "name": "certificate", - "type": ".google.cloud.security.privateca.v1beta1.Certificate" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" - }, - "method": { - "shortName": "CreateCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } + "clientLibrary": { + "name": "nodejs-privateca", + "version": "3.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.security.privateca.v1beta1", + "version": "v1beta1" + } + ] }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async", - "title": "CertificateAuthorityService getCertificate Sample", - "origin": "API_DEFINITION", - "description": " Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].", - "canonical": true, - "file": "certificate_authority_service.get_certificate.js", - "language": "JAVASCRIPT", - "segments": [ + "snippets": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_async", + "title": "CertificateAuthorityService createCertificate Sample", + "origin": "API_DEFINITION", + "description": " Create a new [Certificate][google.cloud.security.privateca.v1beta1.Certificate] in a given Project, Location from a particular [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.create_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1beta1.Certificate" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async", - "title": "CertificateAuthorityService listCertificates Sample", - "origin": "API_DEFINITION", - "description": " Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].", - "canonical": true, - "file": "certificate_authority_service.list_certificates.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 80, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificates", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", - "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.security.privateca.v1beta1.ListCertificatesResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_async", + "title": "CertificateAuthorityService getCertificate Sample", + "origin": "API_DEFINITION", + "description": " Returns a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.get_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificates", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async", - "title": "CertificateAuthorityService revokeCertificate Sample", - "origin": "API_DEFINITION", - "description": " Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].", - "canonical": true, - "file": "certificate_authority_service.revoke_certificate.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RevokeCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "reason", - "type": ".google.cloud.security.privateca.v1beta1.RevocationReason" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_async", + "title": "CertificateAuthorityService listCertificates Sample", + "origin": "API_DEFINITION", + "description": " Lists [Certificates][google.cloud.security.privateca.v1beta1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.list_certificates.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 80, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "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.security.privateca.v1beta1.ListCertificatesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificates", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificates", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "RevokeCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async", - "title": "CertificateAuthorityService updateCertificate Sample", - "origin": "API_DEFINITION", - "description": " Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field.", - "canonical": true, - "file": "certificate_authority_service.update_certificate.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", - "async": true, - "parameters": [ - { - "name": "certificate", - "type": ".google.cloud.security.privateca.v1beta1.Certificate" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_async", + "title": "CertificateAuthorityService revokeCertificate Sample", + "origin": "API_DEFINITION", + "description": " Revoke a [Certificate][google.cloud.security.privateca.v1beta1.Certificate].", + "canonical": true, + "file": "certificate_authority_service.revoke_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "reason", + "type": ".google.cloud.security.privateca.v1beta1.RevocationReason" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "RevokeCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RevokeCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificate", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", - "title": "CertificateAuthorityService activateCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.", - "canonical": true, - "file": "certificate_authority_service.activate_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ActivateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "pem_ca_certificate", - "type": "TYPE_STRING" - }, - { - "name": "subordinate_config", - "type": ".google.cloud.security.privateca.v1beta1.SubordinateConfig" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_async", + "title": "CertificateAuthorityService updateCertificate Sample", + "origin": "API_DEFINITION", + "description": " Update a [Certificate][google.cloud.security.privateca.v1beta1.Certificate]. Currently, the only field you can update is the [labels][google.cloud.security.privateca.v1beta1.Certificate.labels] field.", + "canonical": true, + "file": "certificate_authority_service.update_certificate.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "async": true, + "parameters": [ + { + "name": "certificate", + "type": ".google.cloud.security.privateca.v1beta1.Certificate" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.Certificate", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificate", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificate", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ActivateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", - "title": "CertificateAuthorityService createCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.", - "canonical": true, - "file": "certificate_authority_service.create_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "certificate_authority_id", - "type": "TYPE_STRING" - }, - { - "name": "certificate_authority", - "type": ".google.cloud.security.privateca.v1beta1.CertificateAuthority" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_async", + "title": "CertificateAuthorityService activateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Activate a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. After the parent Certificate Authority signs a certificate signing request from [FetchCertificateAuthorityCsr][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr], this method can complete the activation process.", + "canonical": true, + "file": "certificate_authority_service.activate_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "pem_ca_certificate", + "type": "TYPE_STRING" + }, + { + "name": "subordinate_config", + "type": ".google.cloud.security.privateca.v1beta1.SubordinateConfig" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ActivateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "CreateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", - "title": "CertificateAuthorityService disableCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.disable_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DisableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_async", + "title": "CertificateAuthorityService createCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Create a new [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] in a given Project and Location.", + "canonical": true, + "file": "certificate_authority_service.create_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority_id", + "type": "TYPE_STRING" + }, + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1beta1.CertificateAuthority" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "CreateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.CreateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "DisableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", - "title": "CertificateAuthorityService enableCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.enable_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "EnableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_async", + "title": "CertificateAuthorityService disableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Disable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.disable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "DisableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.DisableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "EnableCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", - "title": "CertificateAuthorityService fetchCertificateAuthorityCsr Sample", - "origin": "API_DEFINITION", - "description": " Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.fetch_certificate_authority_csr.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchCertificateAuthorityCsr", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_async", + "title": "CertificateAuthorityService enableCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Enable a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.enable_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "EnableCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.EnableCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "FetchCertificateAuthorityCsr", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async", - "title": "CertificateAuthorityService getCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.get_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.CertificateAuthority", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_async", + "title": "CertificateAuthorityService fetchCertificateAuthorityCsr Sample", + "origin": "API_DEFINITION", + "description": " Fetch a certificate signing request (CSR) from a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is in state [PENDING_ACTIVATION][google.cloud.security.privateca.v1beta1.CertificateAuthority.State.PENDING_ACTIVATION] and is of type [SUBORDINATE][google.cloud.security.privateca.v1beta1.CertificateAuthority.Type.SUBORDINATE]. The CSR must then be signed by the desired parent Certificate Authority, which could be another [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] resource, or could be an on-prem certificate authority. See also [ActivateCertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.fetch_certificate_authority_csr.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "FetchCertificateAuthorityCsr", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", - "title": "CertificateAuthorityService listCertificateAuthorities Sample", - "origin": "API_DEFINITION", - "description": " Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.list_certificate_authorities.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificateAuthorities", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", - "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.security.privateca.v1beta1.ListCertificateAuthoritiesResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_async", + "title": "CertificateAuthorityService getCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.CertificateAuthority", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificateAuthorities", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async", - "title": "CertificateAuthorityService restoreCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.", - "canonical": true, - "file": "certificate_authority_service.restore_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestoreCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_async", + "title": "CertificateAuthorityService listCertificateAuthorities Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateAuthorities][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_authorities.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "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.security.privateca.v1beta1.ListCertificateAuthoritiesResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateAuthorities", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateAuthorities", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "RestoreCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async", - "title": "CertificateAuthorityService scheduleDeleteCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.", - "canonical": true, - "file": "certificate_authority_service.schedule_delete_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 66, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ScheduleDeleteCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_async", + "title": "CertificateAuthorityService restoreCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Restore a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] that is scheduled for deletion.", + "canonical": true, + "file": "certificate_authority_service.restore_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestoreCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "RestoreCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.RestoreCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ScheduleDeleteCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", - "title": "CertificateAuthorityService updateCertificateAuthority Sample", - "origin": "API_DEFINITION", - "description": " Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", - "canonical": true, - "file": "certificate_authority_service.update_certificate_authority.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", - "async": true, - "parameters": [ - { - "name": "certificate_authority", - "type": ".google.cloud.security.privateca.v1beta1.CertificateAuthority" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_async", + "title": "CertificateAuthorityService scheduleDeleteCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Schedule a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority] for deletion.", + "canonical": true, + "file": "certificate_authority_service.schedule_delete_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ScheduleDeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ScheduleDeleteCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ScheduleDeleteCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificateAuthority", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", - "title": "CertificateAuthorityService getCertificateRevocationList Sample", - "origin": "API_DEFINITION", - "description": " Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", - "canonical": true, - "file": "certificate_authority_service.get_certificate_revocation_list.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 51, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.CertificateRevocationList", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_async", + "title": "CertificateAuthorityService updateCertificateAuthority Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateAuthority][google.cloud.security.privateca.v1beta1.CertificateAuthority].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_authority.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "async": true, + "parameters": [ + { + "name": "certificate_authority", + "type": ".google.cloud.security.privateca.v1beta1.CertificateAuthority" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateAuthority", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateAuthority", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", - "title": "CertificateAuthorityService listCertificateRevocationLists Sample", - "origin": "API_DEFINITION", - "description": " Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", - "canonical": true, - "file": "certificate_authority_service.list_certificate_revocation_lists.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListCertificateRevocationLists", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", - "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.security.privateca.v1beta1.ListCertificateRevocationListsResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_async", + "title": "CertificateAuthorityService getCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Returns a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.get_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.CertificateRevocationList", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListCertificateRevocationLists", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", - "title": "CertificateAuthorityService updateCertificateRevocationList Sample", - "origin": "API_DEFINITION", - "description": " Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", - "canonical": true, - "file": "certificate_authority_service.update_certificate_revocation_list.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", - "async": true, - "parameters": [ - { - "name": "certificate_revocation_list", - "type": ".google.cloud.security.privateca.v1beta1.CertificateRevocationList" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "request_id", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_async", + "title": "CertificateAuthorityService listCertificateRevocationLists Sample", + "origin": "API_DEFINITION", + "description": " Lists [CertificateRevocationLists][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.list_certificate_revocation_lists.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "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.security.privateca.v1beta1.ListCertificateRevocationListsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListCertificateRevocationLists", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListCertificateRevocationLists", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "UpdateCertificateRevocationList", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async", - "title": "CertificateAuthorityService getReusableConfig Sample", - "origin": "API_DEFINITION", - "description": " Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].", - "canonical": true, - "file": "certificate_authority_service.get_reusable_config.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 50, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetReusableConfig", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.security.privateca.v1beta1.ReusableConfig", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_async", + "title": "CertificateAuthorityService updateCertificateRevocationList Sample", + "origin": "API_DEFINITION", + "description": " Update a [CertificateRevocationList][google.cloud.security.privateca.v1beta1.CertificateRevocationList].", + "canonical": true, + "file": "certificate_authority_service.update_certificate_revocation_list.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "async": true, + "parameters": [ + { + "name": "certificate_revocation_list", + "type": ".google.cloud.security.privateca.v1beta1.CertificateRevocationList" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "request_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "UpdateCertificateRevocationList", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.UpdateCertificateRevocationList", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "GetReusableConfig", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } - } - } - }, - { - "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async", - "title": "CertificateAuthorityService listReusableConfigs Sample", - "origin": "API_DEFINITION", - "description": " Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].", - "canonical": true, - "file": "certificate_authority_service.list_reusable_configs.js", - "language": "JAVASCRIPT", - "segments": [ { - "start": 25, - "end": 76, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListReusableConfigs", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", - "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.security.privateca.v1beta1.ListReusableConfigsResponse", - "client": { - "shortName": "CertificateAuthorityServiceClient", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_async", + "title": "CertificateAuthorityService getReusableConfig Sample", + "origin": "API_DEFINITION", + "description": " Returns a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig].", + "canonical": true, + "file": "certificate_authority_service.get_reusable_config.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReusableConfig", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.security.privateca.v1beta1.ReusableConfig", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "GetReusableConfig", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.GetReusableConfig", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } }, - "method": { - "shortName": "ListReusableConfigs", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", - "service": { - "shortName": "CertificateAuthorityService", - "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" - } + { + "regionTag": "privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_async", + "title": "CertificateAuthorityService listReusableConfigs Sample", + "origin": "API_DEFINITION", + "description": " Lists [ReusableConfigs][google.cloud.security.privateca.v1beta1.ReusableConfig].", + "canonical": true, + "file": "certificate_authority_service.list_reusable_configs.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReusableConfigs", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "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.security.privateca.v1beta1.ListReusableConfigsResponse", + "client": { + "shortName": "CertificateAuthorityServiceClient", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityServiceClient" + }, + "method": { + "shortName": "ListReusableConfigs", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ListReusableConfigs", + "service": { + "shortName": "CertificateAuthorityService", + "fullName": "google.cloud.security.privateca.v1beta1.CertificateAuthorityService" + } + } + } } - } - } - ] -} + ] +} \ No newline at end of file From fdf7aeb7bd66d2a8498ac9e54309ed88b9096024 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 3 May 2022 03:22:27 +0200 Subject: [PATCH 089/113] chore(deps): update dependency @types/mocha to v9 (#174) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index c09cce4ffc7..21e78c6bea3 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -42,7 +42,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 2d1d1d6d3907335150ac22c9d8c3e8a93c517a32 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 9 May 2022 17:36:23 +0200 Subject: [PATCH 090/113] chore(deps): update dependency sinon to v14 (#177) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 21e78c6bea3..973c472b511 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -54,7 +54,7 @@ "mocha": "^8.1.2", "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", "webpack": "^5.0.0", From 967ad1d2bdcecc2792406024af1f8d9fea601986 Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Wed, 18 May 2022 17:48:20 -0700 Subject: [PATCH 091/113] build!: update library to use Node 12 (#180) * build!: Update library to use Node 12 Co-authored-by: Owl Bot --- packages/google-cloud-security-privateca/package.json | 10 +++++----- .../samples/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 973c472b511..81dd879f618 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -39,28 +39,28 @@ "test": "c8 mocha build/test" }, "dependencies": { - "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.1.2", + "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", "webpack": "^5.0.0", "webpack-cli": "^4.0.0" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } } diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 867e1f303a4..adc908f834e 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "author": "Google LLC", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js" From 54cc16d86116a0bd9eae002343c76431fc2cd493 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 11:57:42 -0400 Subject: [PATCH 092/113] chore(main): release 4.0.0 (#181) 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-security-privateca/CHANGELOG.md | 11 +++++++++++ packages/google-cloud-security-privateca/package.json | 2 +- ...t_metadata.google.cloud.security.privateca.v1.json | 2 +- ...adata.google.cloud.security.privateca.v1beta1.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 45977f8123d..002446fcc0f 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [4.0.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v3.1.0...v4.0.0) (2022-05-19) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#180) + +### Build System + +* update library to use Node 12 ([#180](https://github.com/googleapis/nodejs-security-private-ca/issues/180)) ([118d786](https://github.com/googleapis/nodejs-security-private-ca/commit/118d786e8520c83baa5c585b55a3970e922c65e5)) + ## [3.1.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v3.0.0...v3.1.0) (2022-03-16) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 81dd879f618..761bf2e7dc4 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "3.1.0", + "version": "4.0.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index b965341c0fc..000f8f8eb1a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "3.1.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index 3b24854faab..3a0c87196db 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "3.1.0", + "version": "4.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index adc908f834e..b27cc3914c0 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^3.1.0" + "@google-cloud/security-private-ca": "^4.0.0" }, "devDependencies": { "c8": "^7.1.0", From 62ad711210c66b000072fac5662943c3b2517fbb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jun 2022 00:10:54 +0200 Subject: [PATCH 093/113] chore(deps): update dependency jsdoc-region-tag to v2 (#186) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 761bf2e7dc4..1a13c3fa7c4 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -49,7 +49,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 b73fe1220fb57a6160b2b8bc17fced537c9be130 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 14 Jun 2022 00:18:16 +0200 Subject: [PATCH 094/113] chore(deps): update dependency jsdoc-fresh to v2 (#185) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 1a13c3fa7c4..d9534305055 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -48,7 +48,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 07ad7e5fbe8ea9b7267a988ea00944632fcb189f 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 17:27:27 -0700 Subject: [PATCH 095/113] feat: support regapic LRO (#187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: support regapic LRO 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 * 🦉 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 --- .../certificate_authority_service_client.ts | 95 ++++++++++++++++--- .../certificate_authority_service_client.ts | 27 +++--- 2 files changed, 98 insertions(+), 24 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 16ecd81684c..4c2d4e92897 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -79,7 +80,7 @@ export class CertificateAuthorityServiceClient { * * @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] @@ -102,11 +103,10 @@ export class CertificateAuthorityServiceClient { * 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. @@ -229,16 +229,87 @@ export class CertificateAuthorityServiceClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = [ + { + selector: 'google.cloud.location.Locations.GetLocation', + get: '/v1/{name=projects/*/locations/*}', + }, + { + selector: 'google.cloud.location.Locations.ListLocations', + get: '/v1/{name=projects/*}/locations', + }, + { + selector: 'google.iam.v1.IAMPolicy.GetIamPolicy', + get: '/v1/{resource=projects/*/locations/*/caPools/*}:getIamPolicy', + additional_bindings: [ + { + get: '/v1/{resource=projects/*/locations/*/certificateTemplates/*}:getIamPolicy', + }, + { + get: '/v1/{resource=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:getIamPolicy', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.SetIamPolicy', + post: '/v1/{resource=projects/*/locations/*/caPools/*}:setIamPolicy', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/certificateTemplates/*}:setIamPolicy', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:setIamPolicy', + body: '*', + }, + ], + }, + { + selector: 'google.iam.v1.IAMPolicy.TestIamPermissions', + post: '/v1/{resource=projects/*/locations/*/caPools/*}:testIamPermissions', + body: '*', + additional_bindings: [ + { + post: '/v1/{resource=projects/*/locations/*/certificateTemplates/*}:testIamPermissions', + body: '*', + }, + { + post: '/v1/{resource=projects/*/locations/*/caPools/*/certificateAuthorities/*/certificateRevocationLists/*}:testIamPermissions', + body: '*', + }, + ], + }, + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1/{name=projects/*/locations/*}/operations', + }, + ]; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const activateCertificateAuthorityResponse = protoFilesRoot.lookup( '.google.cloud.security.privateca.v1.CertificateAuthority' diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 97fb5c372e7..a03a0077b2b 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -23,6 +23,7 @@ import { CallOptions, Descriptors, ClientOptions, + GrpcClientOptions, LROperation, PaginationCallback, GaxCall, @@ -73,7 +74,7 @@ export class CertificateAuthorityServiceClient { * * @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] @@ -96,11 +97,10 @@ export class CertificateAuthorityServiceClient { * 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. @@ -212,16 +212,19 @@ export class CertificateAuthorityServiceClient { }; const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(jsonProtos); - // This API contains "long-running operations", which return a // an Operation object that allows for tracking of the operation, // rather than holding a request open. - + const lroOptions: GrpcClientOptions = { + auth: this.auth, + grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, + }; + if (opts.fallback === 'rest') { + lroOptions.protoJson = protoFilesRoot; + lroOptions.httpRules = []; + } this.operationsClient = this._gaxModule - .lro({ - auth: this.auth, - grpc: 'grpc' in this._gaxGrpc ? this._gaxGrpc.grpc : undefined, - }) + .lro(lroOptions) .operationsClient(opts); const activateCertificateAuthorityResponse = protoFilesRoot.lookup( '.google.cloud.security.privateca.v1beta1.CertificateAuthority' From 16fceb4696882f82069bd5a481baf5bd1bc0df2c 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:23 +0000 Subject: [PATCH 096/113] chore(main): release 4.1.0 (#188) :robot: I have created a release *beep* *boop* --- ## [4.1.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v4.0.0...v4.1.0) (2022-06-30) ### Features * support regapic LRO ([#187](https://github.com/googleapis/nodejs-security-private-ca/issues/187)) ([2b2f553](https://github.com/googleapis/nodejs-security-private-ca/commit/2b2f553e60256ad6308447b4a8d1062186982f42)) --- 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- ...nippet_metadata.google.cloud.security.privateca.v1.json | 2 +- ...t_metadata.google.cloud.security.privateca.v1beta1.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 002446fcc0f..13d1efbf3b8 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v4.0.0...v4.1.0) (2022-06-30) + + +### Features + +* support regapic LRO ([#187](https://github.com/googleapis/nodejs-security-private-ca/issues/187)) ([2b2f553](https://github.com/googleapis/nodejs-security-private-ca/commit/2b2f553e60256ad6308447b4a8d1062186982f42)) + ## [4.0.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v3.1.0...v4.0.0) (2022-05-19) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index d9534305055..020fd86f6ff 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "4.0.0", + "version": "4.1.0", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index 000f8f8eb1a..e179c463045 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index 3a0c87196db..9183f3ac087 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index b27cc3914c0..7ae5e061316 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^4.0.0" + "@google-cloud/security-private-ca": "^4.1.0" }, "devDependencies": { "c8": "^7.1.0", From af19feb7a4e4b94bf94c360e3265f5a1609dd03a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 14:42:19 -0400 Subject: [PATCH 097/113] fix(privateca): publish v1beta1 LRO HTTP rules PiperOrigin-RevId: 458248734 Source-Link: https://github.com/googleapis/googleapis/commit/e63fcd7ad163a5fb024f08cf5e0868d360b625c5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/8dcb37f65a59ea28677386ae518a1faadb33f12d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOGRjYjM3ZjY1YTU5ZWEyODY3NzM4NmFlNTE4YTFmYWFkYjMzZjEyZCJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Source-Link: https://github.com/googleapis/googleapis/commit/ae65014049c6eb195741d7efbd0b10bee3f83d4f Source-Link: https://github.com/googleapis/googleapis-gen/commit/b09ede435cce110446d4ab9f62a081b571d37e3f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjA5ZWRlNDM1Y2NlMTEwNDQ2ZDRhYjlmNjJhMDgxYjU3MWQzN2UzZiJ9 See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Benjamin E. Coe --- .../certificate_authority_service_client.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index a03a0077b2b..977d755822a 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -221,7 +221,25 @@ export class CertificateAuthorityServiceClient { }; if (opts.fallback === 'rest') { lroOptions.protoJson = protoFilesRoot; - lroOptions.httpRules = []; + lroOptions.httpRules = [ + { + selector: 'google.longrunning.Operations.CancelOperation', + post: '/v1beta1/{name=projects/*/locations/*/operations/*}:cancel', + body: '*', + }, + { + selector: 'google.longrunning.Operations.DeleteOperation', + delete: '/v1beta1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.GetOperation', + get: '/v1beta1/{name=projects/*/locations/*/operations/*}', + }, + { + selector: 'google.longrunning.Operations.ListOperations', + get: '/v1beta1/{name=projects/*/locations/*}/operations', + }, + ]; } this.operationsClient = this._gaxModule .lro(lroOptions) From 3b0429fa2bf7809f8159beadf926400a583cc1d7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 4 Jul 2022 14:56:59 -0400 Subject: [PATCH 098/113] chore(main): release 4.1.1 (#192) 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-security-privateca/CHANGELOG.md | 7 +++++++ packages/google-cloud-security-privateca/package.json | 2 +- ...nippet_metadata.google.cloud.security.privateca.v1.json | 2 +- ...t_metadata.google.cloud.security.privateca.v1beta1.json | 2 +- .../google-cloud-security-privateca/samples/package.json | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 13d1efbf3b8..48435263977 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.1](https://github.com/googleapis/nodejs-security-private-ca/compare/v4.1.0...v4.1.1) (2022-07-04) + + +### Bug Fixes + +* **privateca:** publish v1beta1 LRO HTTP rules ([cc4a64a](https://github.com/googleapis/nodejs-security-private-ca/commit/cc4a64a47ec713f87d66da7d9a4e6dc004af4bca)) + ## [4.1.0](https://github.com/googleapis/nodejs-security-private-ca/compare/v4.0.0...v4.1.0) (2022-06-30) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 020fd86f6ff..1f24270f5b7 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "4.1.0", + "version": "4.1.1", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index e179c463045..fb20a0957ac 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "4.1.0", + "version": "4.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index 9183f3ac087..de9f37fabfc 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "4.1.0", + "version": "4.1.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 7ae5e061316..3b1379fee8d 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^4.1.0" + "@google-cloud/security-private-ca": "^4.1.1" }, "devDependencies": { "c8": "^7.1.0", From f005e910266897a04c5f3d28c3b791e1fe20b3f4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Jul 2022 01:58:14 +0200 Subject: [PATCH 099/113] chore(deps): update dependency linkinator to v4 (#193) 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.2) | [![age](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/compatibility-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/linkinator/4.0.2/confidence-slim/2.16.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
JustinBeckwith/linkinator ### [`v4.0.2`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.2) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.1...v4.0.2) ##### Bug Fixes - address srcset parsing with multiple spaces ([#​512](https://togithub.com/JustinBeckwith/linkinator/issues/512)) ([fefb5b6](https://togithub.com/JustinBeckwith/linkinator/commit/fefb5b6734fc4ab335793358c5f491338ecbeb90)) ### [`v4.0.1`](https://togithub.com/JustinBeckwith/linkinator/releases/tag/v4.0.1) [Compare Source](https://togithub.com/JustinBeckwith/linkinator/compare/v4.0.0...v4.0.1) ##### Bug Fixes - properly parse srcset attribute ([#​510](https://togithub.com/JustinBeckwith/linkinator/issues/510)) ([9a8a83c](https://togithub.com/JustinBeckwith/linkinator/commit/9a8a83c35182b3cd4daee62a00f156767fe5c6a7)) ### [`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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 1f24270f5b7..115a3f0aca3 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -50,7 +50,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 1ac76ac419fb55bb48f035a54eda65e55cc69b36 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 19 Aug 2022 20:20:26 +0000 Subject: [PATCH 100/113] chore: remove unused proto imports (#194) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 --- .../google/cloud/security/privateca/v1beta1/resources.proto | 1 - .../protos/google/cloud/security/privateca/v1beta1/service.proto | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto index f2bf7de0f12..5e98d97ace1 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/resources.proto @@ -21,7 +21,6 @@ import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1Beta1"; diff --git a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto index 3cc010de7ec..965736b954f 100644 --- a/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto +++ b/packages/google-cloud-security-privateca/protos/google/cloud/security/privateca/v1beta1/service.proto @@ -22,7 +22,6 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/security/privateca/v1beta1/resources.proto"; import "google/longrunning/operations.proto"; -import "google/protobuf/duration.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; From bb0e414f61a61513ac2066e325cccb10777e6e38 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:12:23 +0000 Subject: [PATCH 101/113] fix: better support for fallback mode (#195) - [ ] 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 --- ..._service.activate_certificate_authority.js | 3 + ...ficate_authority_service.create_ca_pool.js | 3 + ...te_authority_service.create_certificate.js | 3 + ...ty_service.create_certificate_authority.js | 3 + ...ity_service.create_certificate_template.js | 3 + ...ficate_authority_service.delete_ca_pool.js | 3 + ...ty_service.delete_certificate_authority.js | 3 + ...ity_service.delete_certificate_template.js | 3 + ...y_service.disable_certificate_authority.js | 3 + ...ty_service.enable_certificate_authority.js | 3 + ...ficate_authority_service.fetch_ca_certs.js | 3 + ...service.fetch_certificate_authority_csr.js | 3 + ...rtificate_authority_service.get_ca_pool.js | 3 + ...icate_authority_service.get_certificate.js | 3 + ...ority_service.get_certificate_authority.js | 3 + ...service.get_certificate_revocation_list.js | 3 + ...hority_service.get_certificate_template.js | 3 + ...ificate_authority_service.list_ca_pools.js | 3 + ...ty_service.list_certificate_authorities.js | 3 + ...rvice.list_certificate_revocation_lists.js | 3 + ...rity_service.list_certificate_templates.js | 3 + ...ate_authority_service.list_certificates.js | 3 + ...te_authority_service.revoke_certificate.js | 3 + ..._service.undelete_certificate_authority.js | 3 + ...ficate_authority_service.update_ca_pool.js | 3 + ...te_authority_service.update_certificate.js | 3 + ...ty_service.update_certificate_authority.js | 3 + ...vice.update_certificate_revocation_list.js | 3 + ...ity_service.update_certificate_template.js | 3 + ...ta.google.cloud.security.privateca.v1.json | 58 ++--- ..._service.activate_certificate_authority.js | 3 + ...te_authority_service.create_certificate.js | 3 + ...ty_service.create_certificate_authority.js | 3 + ...y_service.disable_certificate_authority.js | 3 + ...ty_service.enable_certificate_authority.js | 3 + ...service.fetch_certificate_authority_csr.js | 3 + ...icate_authority_service.get_certificate.js | 3 + ...ority_service.get_certificate_authority.js | 3 + ...service.get_certificate_revocation_list.js | 3 + ...e_authority_service.get_reusable_config.js | 3 + ...ty_service.list_certificate_authorities.js | 3 + ...rvice.list_certificate_revocation_lists.js | 3 + ...ate_authority_service.list_certificates.js | 3 + ...authority_service.list_reusable_configs.js | 3 + ...y_service.restore_certificate_authority.js | 3 + ...te_authority_service.revoke_certificate.js | 3 + ...e.schedule_delete_certificate_authority.js | 3 + ...te_authority_service.update_certificate.js | 3 + ...ty_service.update_certificate_authority.js | 3 + ...vice.update_certificate_revocation_list.js | 3 + ...ogle.cloud.security.privateca.v1beta1.json | 40 ++-- .../certificate_authority_service_client.ts | 52 ++--- .../certificate_authority_service_client.ts | 36 +-- .../gapic_certificate_authority_service_v1.ts | 212 +++++++++--------- ...c_certificate_authority_service_v1beta1.ts | 212 +++++++++--------- 55 files changed, 454 insertions(+), 303 deletions(-) diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js index b42290196e6..068f980345d 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js @@ -23,6 +23,9 @@ function main(name, pemCaCertificate, subordinateConfig) { // [START privateca_v1_generated_CertificateAuthorityService_ActivateCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js index 66013c3bc0e..5a1cd20f1a5 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js @@ -23,6 +23,9 @@ function main(parent, caPoolId, caPool) { // [START privateca_v1_generated_CertificateAuthorityService_CreateCaPool_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-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js index f99164bc2bb..270680e8941 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js @@ -23,6 +23,9 @@ function main(parent, certificate) { // [START privateca_v1_generated_CertificateAuthorityService_CreateCertificate_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-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js index ee51d7e7603..71c632afdb3 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js @@ -23,6 +23,9 @@ function main(parent, certificateAuthorityId, certificateAuthority) { // [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js index b719dbff004..bb828c30714 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js @@ -23,6 +23,9 @@ function main(parent, certificateTemplateId, certificateTemplate) { // [START privateca_v1_generated_CertificateAuthorityService_CreateCertificateTemplate_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-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js index c106be891f0..8a319f282fa 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_DeleteCaPool_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-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js index 766bc26f954..d6124534e12 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js index ef9eb376005..ea8a34cba59 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_DeleteCertificateTemplate_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-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js index ab2d1a16ca6..1d8fb27a0b5 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_DisableCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js index ea708a6a0ae..5a4294d6694 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_EnableCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js index 74ba7d64aed..bd813e77d5f 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js @@ -23,6 +23,9 @@ function main(caPool) { // [START privateca_v1_generated_CertificateAuthorityService_FetchCaCerts_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-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js index 275da0dd28d..a64270c4f20 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_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-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js index f1898615a9b..43bbd77daa6 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_GetCaPool_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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js index 5ba3f3909e8..39c6e578b27 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_GetCertificate_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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js index 5c42d6b4004..cb8ea21e399 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_GetCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js index 9d2ca2a40d1..ecc85e5781b 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_GetCertificateRevocationList_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-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js index 3bbec5eb8b4..9b7d2627a37 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_GetCertificateTemplate_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-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js index 803be8a3790..59e137104e3 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1_generated_CertificateAuthorityService_ListCaPools_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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js index b6ab38d92be..597d6633885 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1_generated_CertificateAuthorityService_ListCertificateAuthorities_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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js index 92f4b33a980..fc0ba034059 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1_generated_CertificateAuthorityService_ListCertificateRevocationLists_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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js index 61c4b29e550..f514ed45918 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1_generated_CertificateAuthorityService_ListCertificateTemplates_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-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js index 8d4b1525c5a..9c123b836f1 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1_generated_CertificateAuthorityService_ListCertificates_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-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js index a4776a7824e..41a1dd0928c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js @@ -23,6 +23,9 @@ function main(name, reason) { // [START privateca_v1_generated_CertificateAuthorityService_RevokeCertificate_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-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js index 72949fc4a30..fdaf1b58a02 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1_generated_CertificateAuthorityService_UndeleteCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js index 13c067ced0c..ddcf2f11381 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js @@ -23,6 +23,9 @@ function main(caPool, updateMask) { // [START privateca_v1_generated_CertificateAuthorityService_UpdateCaPool_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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js index 590b914f6fe..d7743520268 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js @@ -23,6 +23,9 @@ function main(certificate, updateMask) { // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificate_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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js index 850c80c4afa..c5e2c37c815 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js @@ -23,6 +23,9 @@ function main(certificateAuthority, updateMask) { // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateAuthority_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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js index 8c71f90a947..d648a36da93 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js @@ -23,6 +23,9 @@ function main(certificateRevocationList, updateMask) { // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_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-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js index 727a169c958..5f7e30e6b68 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js @@ -23,6 +23,9 @@ function main(certificateTemplate, updateMask) { // [START privateca_v1_generated_CertificateAuthorityService_UpdateCertificateTemplate_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-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index fb20a0957ac..984cde3359c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 97, + "end": 100, "type": "FULL" } ], @@ -82,7 +82,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -122,7 +122,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 83, "type": "FULL" } ], @@ -178,7 +178,7 @@ "segments": [ { "start": 25, - "end": 71, + "end": 74, "type": "FULL" } ], @@ -226,7 +226,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -274,7 +274,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -326,7 +326,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -378,7 +378,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -422,7 +422,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -466,7 +466,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -506,7 +506,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -546,7 +546,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -602,7 +602,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -646,7 +646,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -698,7 +698,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -746,7 +746,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 80, "type": "FULL" } ], @@ -798,7 +798,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -846,7 +846,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -886,7 +886,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -942,7 +942,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -986,7 +986,7 @@ "segments": [ { "start": 25, - "end": 65, + "end": 68, "type": "FULL" } ], @@ -1030,7 +1030,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1070,7 +1070,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -1126,7 +1126,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -1174,7 +1174,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -1226,7 +1226,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -1270,7 +1270,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -1310,7 +1310,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -1366,7 +1366,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js index 70d2932aeff..ed1505538d5 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js @@ -23,6 +23,9 @@ function main(name, pemCaCertificate, subordinateConfig) { // [START privateca_v1beta1_generated_CertificateAuthorityService_ActivateCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js index df83e0f9cec..88b48654364 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js @@ -23,6 +23,9 @@ function main(parent, certificate) { // [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificate_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js index eafbbda4004..87702c21da8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js @@ -23,6 +23,9 @@ function main(parent, certificateAuthorityId, certificateAuthority) { // [START privateca_v1beta1_generated_CertificateAuthorityService_CreateCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js index 8f61656f3eb..58ee16f63d1 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_DisableCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js index d6e053ad650..0ef493b1960 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_EnableCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js index f4a09ffa48a..50f81dd8494 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_FetchCertificateAuthorityCsr_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js index 7bdaefb80b2..679ac80582e 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificate_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js index 0f0642d3857..5b33fd1a0f0 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js index 4e3aa98f65f..84e2dce2f3a 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_GetCertificateRevocationList_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js index 52caa32cd07..3e769048671 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_GetReusableConfig_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js index 73c847ec0c9..38cf2939da8 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateAuthorities_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js index c101c2e7454..a187165cc21 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificateRevocationLists_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js index 81c7c01e61e..e305d0ec06c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1beta1_generated_CertificateAuthorityService_ListCertificates_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js index 479948db2bf..207d8e9bffc 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js @@ -23,6 +23,9 @@ function main(parent) { // [START privateca_v1beta1_generated_CertificateAuthorityService_ListReusableConfigs_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js index a6191a25744..df075d5b094 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_RestoreCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js index de0e716a00e..10c9d29b618 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js @@ -23,6 +23,9 @@ function main(name, reason) { // [START privateca_v1beta1_generated_CertificateAuthorityService_RevokeCertificate_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js index 22379e2c438..5ca6098b293 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js @@ -23,6 +23,9 @@ function main(name) { // [START privateca_v1beta1_generated_CertificateAuthorityService_ScheduleDeleteCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js index faa3660239a..cc4607a01ed 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js @@ -23,6 +23,9 @@ function main(certificate, updateMask) { // [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificate_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js index bc4705328f2..7d3ebf7fb8c 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js @@ -23,6 +23,9 @@ function main(certificateAuthority, updateMask) { // [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateAuthority_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-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js index 44d5edbf2b0..d104ce48af1 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js @@ -23,6 +23,9 @@ function main(certificateRevocationList, updateMask) { // [START privateca_v1beta1_generated_CertificateAuthorityService_UpdateCertificateRevocationList_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-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index de9f37fabfc..ff6ed6df641 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -74,7 +74,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -114,7 +114,7 @@ "segments": [ { "start": 25, - "end": 80, + "end": 83, "type": "FULL" } ], @@ -170,7 +170,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -218,7 +218,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 72, "type": "FULL" } ], @@ -266,7 +266,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -318,7 +318,7 @@ "segments": [ { "start": 25, - "end": 78, + "end": 81, "type": "FULL" } ], @@ -370,7 +370,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -414,7 +414,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -458,7 +458,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -498,7 +498,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -538,7 +538,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -594,7 +594,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -638,7 +638,7 @@ "segments": [ { "start": 25, - "end": 66, + "end": 69, "type": "FULL" } ], @@ -682,7 +682,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -730,7 +730,7 @@ "segments": [ { "start": 25, - "end": 51, + "end": 54, "type": "FULL" } ], @@ -770,7 +770,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], @@ -826,7 +826,7 @@ "segments": [ { "start": 25, - "end": 70, + "end": 73, "type": "FULL" } ], @@ -874,7 +874,7 @@ "segments": [ { "start": 25, - "end": 50, + "end": 53, "type": "FULL" } ], @@ -914,7 +914,7 @@ "segments": [ { "start": 25, - "end": 76, + "end": 79, "type": "FULL" } ], diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 4c2d4e92897..3b96b12b70c 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -34,7 +34,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'); /** @@ -617,7 +616,8 @@ export class CertificateAuthorityServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1921,7 +1921,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.activateCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -2083,7 +2083,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -2239,7 +2239,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.disableCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -2395,7 +2395,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.enableCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -2551,7 +2551,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.undeleteCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -2714,7 +2714,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -2871,7 +2871,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateAuthority, @@ -3028,7 +3028,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createCaPool, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CaPool, @@ -3181,7 +3181,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateCaPool, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CaPool, @@ -3333,7 +3333,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteCaPool, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -3491,7 +3491,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateCertificateRevocationList, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateRevocationList, @@ -3653,7 +3653,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createCertificateTemplate, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateTemplate, @@ -3809,7 +3809,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.deleteCertificateTemplate, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.protobuf.Empty, @@ -3966,7 +3966,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateCertificateTemplate, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1.CertificateTemplate, @@ -4142,7 +4142,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificates.createStream( - this.innerApiCalls.listCertificates as gax.GaxCall, + this.innerApiCalls.listCertificates as GaxCall, request, callSettings ); @@ -4206,7 +4206,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4375,7 +4375,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateAuthorities.createStream( - this.innerApiCalls.listCertificateAuthorities as gax.GaxCall, + this.innerApiCalls.listCertificateAuthorities as GaxCall, request, callSettings ); @@ -4435,7 +4435,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4600,7 +4600,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCaPools.createStream( - this.innerApiCalls.listCaPools as gax.GaxCall, + this.innerApiCalls.listCaPools as GaxCall, request, callSettings ); @@ -4660,7 +4660,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCaPools.asyncIterate( this.innerApiCalls['listCaPools'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -4830,7 +4830,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateRevocationLists.createStream( - this.innerApiCalls.listCertificateRevocationLists as gax.GaxCall, + this.innerApiCalls.listCertificateRevocationLists as GaxCall, request, callSettings ); @@ -4891,7 +4891,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -5060,7 +5060,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateTemplates.createStream( - this.innerApiCalls.listCertificateTemplates as gax.GaxCall, + this.innerApiCalls.listCertificateTemplates as GaxCall, request, callSettings ); @@ -5120,7 +5120,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificateTemplates.asyncIterate( this.innerApiCalls['listCertificateTemplates'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index 977d755822a..ee4ce7d6a5d 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -30,7 +30,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'); /** @@ -464,7 +463,8 @@ export class CertificateAuthorityServiceClient { const apiCall = this._gaxModule.createApiCall( callPromise, this._defaults[methodName], - descriptor + descriptor, + this._opts.fallback ); this.innerApiCalls[methodName] = apiCall; @@ -1542,7 +1542,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.activateCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -1704,7 +1704,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.createCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -1860,7 +1860,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.disableCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -2016,7 +2016,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.enableCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -2172,7 +2172,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.restoreCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -2328,7 +2328,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.scheduleDeleteCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -2485,7 +2485,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateCertificateAuthority, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateAuthority, @@ -2643,7 +2643,7 @@ export class CertificateAuthorityServiceClient { const decodeOperation = new gax.Operation( operation, this.descriptors.longrunning.updateCertificateRevocationList, - gax.createDefaultBackoffSettings() + this._gaxModule.createDefaultBackoffSettings() ); return decodeOperation as LROperation< protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList, @@ -2819,7 +2819,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificates.createStream( - this.innerApiCalls.listCertificates as gax.GaxCall, + this.innerApiCalls.listCertificates as GaxCall, request, callSettings ); @@ -2883,7 +2883,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificates.asyncIterate( this.innerApiCalls['listCertificates'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3052,7 +3052,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateAuthorities.createStream( - this.innerApiCalls.listCertificateAuthorities as gax.GaxCall, + this.innerApiCalls.listCertificateAuthorities as GaxCall, request, callSettings ); @@ -3112,7 +3112,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificateAuthorities.asyncIterate( this.innerApiCalls['listCertificateAuthorities'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3282,7 +3282,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listCertificateRevocationLists.createStream( - this.innerApiCalls.listCertificateRevocationLists as gax.GaxCall, + this.innerApiCalls.listCertificateRevocationLists as GaxCall, request, callSettings ); @@ -3343,7 +3343,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listCertificateRevocationLists.asyncIterate( this.innerApiCalls['listCertificateRevocationLists'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } @@ -3508,7 +3508,7 @@ export class CertificateAuthorityServiceClient { const callSettings = defaultCallSettings.merge(options); this.initialize(); return this.descriptors.page.listReusableConfigs.createStream( - this.innerApiCalls.listReusableConfigs as gax.GaxCall, + this.innerApiCalls.listReusableConfigs as GaxCall, request, callSettings ); @@ -3568,7 +3568,7 @@ export class CertificateAuthorityServiceClient { this.initialize(); return this.descriptors.page.listReusableConfigs.asyncIterate( this.innerApiCalls['listReusableConfigs'] as GaxCall, - request as unknown as RequestType, + request as {}, callSettings ) as AsyncIterable; } diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index ab5cf4f64a7..6b4308958ac 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -151,124 +151,126 @@ function stubAsyncIterationCall( } describe('v1.CertificateAuthorityServiceClient', () => { - it('has servicePath', () => { - const servicePath = - certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient - .servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient + .servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient - .apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient - .port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient + .port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - fallback: true, - } - ); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + fallback: true, + } + ); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.certificateAuthorityServiceStub, undefined); - await client.initialize(); - assert(client.certificateAuthorityServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + await client.initialize(); + assert(client.certificateAuthorityServiceStub); + }); - it('has close method for the initialized client', done => { - const client = - new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.certificateAuthorityServiceStub); - client.close().then(() => { - done(); + it('has close method for the initialized client', done => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.certificateAuthorityServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.certificateAuthorityServiceStub, undefined); - client.close().then(() => { - done(); + it('has close method for the non-initialized client', done => { + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - 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', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + 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 certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( - { - 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); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new certificateauthorityserviceModule.v1.CertificateAuthorityServiceClient( + { + 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('createCertificate', () => { diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 2ebbaba6b1c..7ee97aa55a8 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -145,124 +145,126 @@ function stubAsyncIterationCall( } describe('v1beta1.CertificateAuthorityServiceClient', () => { - it('has servicePath', () => { - const servicePath = - certificateauthorityserviceModule.v1beta1 - .CertificateAuthorityServiceClient.servicePath; - assert(servicePath); - }); + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + certificateauthorityserviceModule.v1beta1 + .CertificateAuthorityServiceClient.servicePath; + assert(servicePath); + }); - it('has apiEndpoint', () => { - const apiEndpoint = - certificateauthorityserviceModule.v1beta1 - .CertificateAuthorityServiceClient.apiEndpoint; - assert(apiEndpoint); - }); + it('has apiEndpoint', () => { + const apiEndpoint = + certificateauthorityserviceModule.v1beta1 + .CertificateAuthorityServiceClient.apiEndpoint; + assert(apiEndpoint); + }); - it('has port', () => { - const port = - certificateauthorityserviceModule.v1beta1 - .CertificateAuthorityServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); + it('has port', () => { + const port = + certificateauthorityserviceModule.v1beta1 + .CertificateAuthorityServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); - it('should create a client with no option', () => { - const client = - new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient(); - assert(client); - }); + it('should create a client with no option', () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient(); + assert(client); + }); - it('should create a client with gRPC fallback', () => { - const client = - new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - fallback: true, - } - ); - assert(client); - }); + it('should create a client with gRPC fallback', () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + fallback: true, + } + ); + assert(client); + }); - it('has initialize method and supports deferred initialization', async () => { - const client = - new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.certificateAuthorityServiceStub, undefined); - await client.initialize(); - assert(client.certificateAuthorityServiceStub); - }); + it('has initialize method and supports deferred initialization', async () => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + await client.initialize(); + assert(client.certificateAuthorityServiceStub); + }); - it('has close method for the initialized client', done => { - const client = - new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - client.initialize(); - assert(client.certificateAuthorityServiceStub); - client.close().then(() => { - done(); + it('has close method for the initialized client', done => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.certificateAuthorityServiceStub); + client.close().then(() => { + done(); + }); }); - }); - it('has close method for the non-initialized client', done => { - const client = - new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - } - ); - assert.strictEqual(client.certificateAuthorityServiceStub, undefined); - client.close().then(() => { - done(); + it('has close method for the non-initialized client', done => { + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.certificateAuthorityServiceStub, undefined); + client.close().then(() => { + done(); + }); }); - }); - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - 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', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + 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 certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( - { - 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); - } + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new certificateauthorityserviceModule.v1beta1.CertificateAuthorityServiceClient( + { + 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('createCertificate', () => { From 11f29ef38f38d1bf7fc076f461c411fbe8128417 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 01:12:21 +0000 Subject: [PATCH 102/113] fix: change import long to require (#196) 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 | 1449 ++- .../protos/protos.js | 8620 ++++++++++++----- .../protos/protos.json | 24 + 3 files changed, 7521 insertions(+), 2572 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index a43d9df3aa2..de4b0bf9c27 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/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 { @@ -213,6 +213,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateAuthority + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateAuthority { @@ -328,6 +335,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessUrls + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyVersionSpec. */ @@ -427,6 +441,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyVersionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** SignHashAlgorithm enum. */ @@ -555,6 +576,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaPool + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CaPool { @@ -660,6 +688,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishingOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an IssuancePolicy. */ @@ -780,6 +815,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssuancePolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace IssuancePolicy { @@ -881,6 +923,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedKeyType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace AllowedKeyType { @@ -979,6 +1028,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RsaKeyType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EcKeyType. */ @@ -1069,6 +1125,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EcKeyType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace EcKeyType { @@ -1177,6 +1240,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssuanceModes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -1323,6 +1393,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateRevocationList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateRevocationList { @@ -1427,6 +1504,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevokedCertificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** State enum. */ @@ -1606,6 +1690,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Certificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Certificate { @@ -1704,6 +1795,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevocationDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -1837,6 +1935,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a X509Parameters. */ @@ -1951,6 +2056,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for X509Parameters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace X509Parameters { @@ -2055,6 +2167,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2155,6 +2274,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubordinateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SubordinateConfig { @@ -2247,6 +2373,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubordinateConfigChain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2344,6 +2477,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PublicKey { @@ -2455,6 +2595,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateConfig { @@ -2553,6 +2700,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubjectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2686,6 +2840,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateDescription { @@ -2808,6 +2969,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubjectDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyId. */ @@ -2898,6 +3066,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CertificateFingerprint. */ @@ -2988,6 +3163,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateFingerprint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3079,6 +3261,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ObjectId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a X509Extension. */ @@ -3181,6 +3370,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for X509Extension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyUsage. */ @@ -3283,6 +3479,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyUsage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace KeyUsage { @@ -3423,6 +3626,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyUsageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExtendedKeyUsageOptions. */ @@ -3543,6 +3753,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtendedKeyUsageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -3676,6 +3893,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Subject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SubjectAltNames. */ @@ -3790,6 +4014,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubjectAltNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CertificateIdentityConstraints. */ @@ -3898,6 +4129,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateIdentityConstraints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CertificateExtensionConstraints. */ @@ -3994,6 +4232,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateExtensionConstraints + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateExtensionConstraints { @@ -4459,203 +4704,203 @@ export namespace google { namespace CertificateAuthorityService { /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCertificate}. * @param error Error, if any * @param [response] Certificate */ type CreateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificate}. * @param error Error, if any * @param [response] Certificate */ type GetCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificates}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificates}. * @param error Error, if any * @param [response] ListCertificatesResponse */ type ListCertificatesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificatesResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#revokeCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|revokeCertificate}. * @param error Error, if any * @param [response] Certificate */ type RevokeCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificate}. * @param error Error, if any * @param [response] Certificate */ type UpdateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#activateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|activateCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type ActivateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type CreateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#disableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|disableCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type DisableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#enableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|enableCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type EnableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|fetchCertificateAuthorityCsr}. * @param error Error, if any * @param [response] FetchCertificateAuthorityCsrResponse */ type FetchCertificateAuthorityCsrCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificateAuthority}. * @param error Error, if any * @param [response] CertificateAuthority */ type GetCertificateAuthorityCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CertificateAuthority) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateAuthorities}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificateAuthorities}. * @param error Error, if any * @param [response] ListCertificateAuthoritiesResponse */ type ListCertificateAuthoritiesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#undeleteCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|undeleteCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type UndeleteCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|deleteCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type DeleteCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type UpdateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCaPool}. * @param error Error, if any * @param [response] Operation */ type CreateCaPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCaPool}. * @param error Error, if any * @param [response] Operation */ type UpdateCaPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCaPool}. * @param error Error, if any * @param [response] CaPool */ type GetCaPoolCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CaPool) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCaPools}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCaPools}. * @param error Error, if any * @param [response] ListCaPoolsResponse */ type ListCaPoolsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCaPoolsResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|deleteCaPool}. * @param error Error, if any * @param [response] Operation */ type DeleteCaPoolCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCaCerts}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|fetchCaCerts}. * @param error Error, if any * @param [response] FetchCaCertsResponse */ type FetchCaCertsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.FetchCaCertsResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificateRevocationList}. * @param error Error, if any * @param [response] CertificateRevocationList */ type GetCertificateRevocationListCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CertificateRevocationList) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateRevocationLists}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificateRevocationLists}. * @param error Error, if any * @param [response] ListCertificateRevocationListsResponse */ type ListCertificateRevocationListsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificateRevocationList}. * @param error Error, if any * @param [response] Operation */ type UpdateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCertificateTemplate}. * @param error Error, if any * @param [response] Operation */ type CreateCertificateTemplateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|deleteCertificateTemplate}. * @param error Error, if any * @param [response] Operation */ type DeleteCertificateTemplateCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificateTemplate}. * @param error Error, if any * @param [response] CertificateTemplate */ type GetCertificateTemplateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.CertificateTemplate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateTemplates}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificateTemplates}. * @param error Error, if any * @param [response] ListCertificateTemplatesResponse */ type ListCertificateTemplatesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1.ListCertificateTemplatesResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificateTemplate}. * @param error Error, if any * @param [response] Operation */ @@ -4780,6 +5025,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateRequest. */ @@ -4870,6 +5122,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificatesRequest. */ @@ -4984,6 +5243,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificatesResponse. */ @@ -5086,6 +5352,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RevokeCertificateRequest. */ @@ -5188,6 +5461,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevokeCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateRequest. */ @@ -5290,6 +5570,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ActivateCertificateAuthorityRequest. */ @@ -5398,6 +5685,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateCertificateAuthorityRequest. */ @@ -5506,6 +5800,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DisableCertificateAuthorityRequest. */ @@ -5602,6 +5903,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisableCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnableCertificateAuthorityRequest. */ @@ -5698,6 +6006,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnableCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchCertificateAuthorityCsrRequest. */ @@ -5788,6 +6103,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchCertificateAuthorityCsrRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchCertificateAuthorityCsrResponse. */ @@ -5878,6 +6200,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchCertificateAuthorityCsrResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateAuthorityRequest. */ @@ -5968,6 +6297,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateAuthoritiesRequest. */ @@ -6082,6 +6418,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateAuthoritiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateAuthoritiesResponse. */ @@ -6184,6 +6527,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateAuthoritiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UndeleteCertificateAuthorityRequest. */ @@ -6280,6 +6630,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UndeleteCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteCertificateAuthorityRequest. */ @@ -6388,6 +6745,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateAuthorityRequest. */ @@ -6490,6 +6854,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateCaPoolRequest. */ @@ -6598,6 +6969,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCaPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCaPoolRequest. */ @@ -6700,6 +7078,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCaPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteCaPoolRequest. */ @@ -6796,6 +7181,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteCaPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchCaCertsRequest. */ @@ -6892,6 +7284,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchCaCertsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchCaCertsResponse. */ @@ -6982,6 +7381,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchCaCertsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FetchCaCertsResponse { @@ -7074,6 +7480,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertChain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -7165,6 +7578,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCaPoolRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCaPoolsRequest. */ @@ -7279,6 +7699,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCaPoolsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCaPoolsResponse. */ @@ -7381,6 +7808,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCaPoolsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateRevocationListRequest. */ @@ -7471,6 +7905,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateRevocationListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateRevocationListsRequest. */ @@ -7585,6 +8026,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateRevocationListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateRevocationListsResponse. */ @@ -7687,6 +8135,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateRevocationListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateRevocationListRequest. */ @@ -7789,6 +8244,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateRevocationListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateCertificateTemplateRequest. */ @@ -7897,6 +8359,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCertificateTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteCertificateTemplateRequest. */ @@ -7993,6 +8462,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteCertificateTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateTemplateRequest. */ @@ -8083,6 +8559,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateTemplatesRequest. */ @@ -8197,6 +8680,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateTemplatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateTemplatesResponse. */ @@ -8299,6 +8789,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateTemplatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateTemplateRequest. */ @@ -8401,6 +8898,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -8527,6 +9031,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -8723,6 +9234,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateAuthority + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateAuthority { @@ -8821,6 +9339,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssuingOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CertificateAuthorityPolicy. */ @@ -8950,6 +9475,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateAuthorityPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateAuthorityPolicy { @@ -9042,6 +9574,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedConfigList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an AllowedSubjectAltNames. */ @@ -9162,6 +9701,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedSubjectAltNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an IssuanceModes. */ @@ -9258,6 +9804,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssuanceModes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -9355,6 +9908,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessUrls + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyVersionSpec. */ @@ -9454,6 +10014,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyVersionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Type enum. */ @@ -9629,6 +10196,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateRevocationList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateRevocationList { @@ -9733,6 +10307,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevokedCertificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** State enum. */ @@ -9894,6 +10475,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Certificate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Certificate { @@ -9992,6 +10580,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevocationDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10113,7 +10708,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } + + /** + * Gets the default type url for ReusableConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } /** Properties of a ReusableConfigValues. */ interface IReusableConfigValues { @@ -10227,6 +10829,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReusableConfigValues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ReusableConfigValues { @@ -10325,6 +10934,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CaOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10425,6 +11041,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReusableConfigWrapper + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SubordinateConfig. */ @@ -10524,6 +11147,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubordinateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace SubordinateConfig { @@ -10616,6 +11246,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubordinateConfigChain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -10713,6 +11350,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublicKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace PublicKey { @@ -10825,6 +11469,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateConfig { @@ -10929,6 +11580,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubjectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11062,6 +11720,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CertificateDescription { @@ -11190,6 +11855,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubjectDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyId. */ @@ -11280,6 +11952,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CertificateFingerprint. */ @@ -11370,6 +12049,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CertificateFingerprint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -11461,6 +12147,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ObjectId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a X509Extension. */ @@ -11563,6 +12256,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for X509Extension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a KeyUsage. */ @@ -11665,6 +12365,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyUsage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace KeyUsage { @@ -11805,6 +12512,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyUsageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ExtendedKeyUsageOptions. */ @@ -11925,6 +12639,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtendedKeyUsageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -12052,6 +12773,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Subject + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a SubjectAltNames. */ @@ -12166,6 +12894,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SubjectAltNames + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** RevocationReason enum. */ @@ -12485,140 +13220,140 @@ export namespace google { namespace CertificateAuthorityService { /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|createCertificate}. * @param error Error, if any * @param [response] Certificate */ type CreateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getCertificate}. * @param error Error, if any * @param [response] Certificate */ type GetCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificates}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listCertificates}. * @param error Error, if any * @param [response] ListCertificatesResponse */ type ListCertificatesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListCertificatesResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#revokeCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|revokeCertificate}. * @param error Error, if any * @param [response] Certificate */ type RevokeCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|updateCertificate}. * @param error Error, if any * @param [response] Certificate */ type UpdateCertificateCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.Certificate) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#activateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|activateCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type ActivateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|createCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type CreateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#disableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|disableCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type DisableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#enableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|enableCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type EnableCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|fetchCertificateAuthorityCsr}. * @param error Error, if any * @param [response] FetchCertificateAuthorityCsrResponse */ type FetchCertificateAuthorityCsrCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getCertificateAuthority}. * @param error Error, if any * @param [response] CertificateAuthority */ type GetCertificateAuthorityCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.CertificateAuthority) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateAuthorities}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listCertificateAuthorities}. * @param error Error, if any * @param [response] ListCertificateAuthoritiesResponse */ type ListCertificateAuthoritiesCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#restoreCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|restoreCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type RestoreCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#scheduleDeleteCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|scheduleDeleteCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type ScheduleDeleteCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|updateCertificateAuthority}. * @param error Error, if any * @param [response] Operation */ type UpdateCertificateAuthorityCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getCertificateRevocationList}. * @param error Error, if any * @param [response] CertificateRevocationList */ type GetCertificateRevocationListCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.CertificateRevocationList) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateRevocationLists}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listCertificateRevocationLists}. * @param error Error, if any * @param [response] ListCertificateRevocationListsResponse */ type ListCertificateRevocationListsCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|updateCertificateRevocationList}. * @param error Error, if any * @param [response] Operation */ type UpdateCertificateRevocationListCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getReusableConfig}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getReusableConfig}. * @param error Error, if any * @param [response] ReusableConfig */ type GetReusableConfigCallback = (error: (Error|null), response?: google.cloud.security.privateca.v1beta1.ReusableConfig) => void; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listReusableConfigs}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listReusableConfigs}. * @param error Error, if any * @param [response] ListReusableConfigsResponse */ @@ -12731,6 +13466,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateRequest. */ @@ -12821,6 +13563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificatesRequest. */ @@ -12935,6 +13684,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificatesResponse. */ @@ -13037,6 +13793,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RevokeCertificateRequest. */ @@ -13139,6 +13902,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RevokeCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateRequest. */ @@ -13241,6 +14011,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ActivateCertificateAuthorityRequest. */ @@ -13349,6 +14126,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateCertificateAuthorityRequest. */ @@ -13457,6 +14241,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DisableCertificateAuthorityRequest. */ @@ -13553,6 +14344,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisableCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an EnableCertificateAuthorityRequest. */ @@ -13649,6 +14447,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnableCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchCertificateAuthorityCsrRequest. */ @@ -13739,6 +14544,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchCertificateAuthorityCsrRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FetchCertificateAuthorityCsrResponse. */ @@ -13829,6 +14641,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchCertificateAuthorityCsrResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateAuthorityRequest. */ @@ -13919,6 +14738,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateAuthoritiesRequest. */ @@ -14033,6 +14859,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateAuthoritiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateAuthoritiesResponse. */ @@ -14135,6 +14968,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateAuthoritiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RestoreCertificateAuthorityRequest. */ @@ -14231,6 +15071,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestoreCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ScheduleDeleteCertificateAuthorityRequest. */ @@ -14327,6 +15174,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScheduleDeleteCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateAuthorityRequest. */ @@ -14429,6 +15283,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateAuthorityRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetCertificateRevocationListRequest. */ @@ -14519,6 +15380,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCertificateRevocationListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateRevocationListsRequest. */ @@ -14633,6 +15501,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateRevocationListsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCertificateRevocationListsResponse. */ @@ -14735,6 +15610,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCertificateRevocationListsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateCertificateRevocationListRequest. */ @@ -14837,6 +15719,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCertificateRevocationListRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetReusableConfigRequest. */ @@ -14927,6 +15816,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetReusableConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListReusableConfigsRequest. */ @@ -15041,6 +15937,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReusableConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListReusableConfigsResponse. */ @@ -15143,6 +16046,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListReusableConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationMetadata. */ @@ -15269,6 +16179,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } @@ -15414,6 +16331,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 { @@ -15526,6 +16450,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. */ @@ -15622,6 +16553,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. */ @@ -15769,6 +16707,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. */ @@ -15865,6 +16810,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; } } @@ -15959,6 +16911,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. */ @@ -15999,6 +16958,9 @@ export namespace google { /** FileDescriptorProto syntax */ syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } /** Represents a FileDescriptorProto. */ @@ -16046,6 +17008,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 @@ -16115,6 +17080,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. */ @@ -16259,6 +17231,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 { @@ -16363,6 +17342,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. */ @@ -16459,6 +17445,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; } } @@ -16550,6 +17543,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. */ @@ -16700,6 +17700,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 { @@ -16828,6 +17835,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. */ @@ -16942,6 +17956,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 { @@ -17040,6 +18061,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; } } @@ -17143,6 +18171,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. */ @@ -17245,6 +18280,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. */ @@ -17365,6 +18407,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. */ @@ -17578,6 +18627,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 { @@ -17705,6 +18761,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. */ @@ -17722,6 +18785,9 @@ export namespace google { /** FieldOptions lazy */ lazy?: (boolean|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + /** FieldOptions deprecated */ deprecated?: (boolean|null); @@ -17759,6 +18825,9 @@ export namespace google { /** FieldOptions lazy. */ public lazy: boolean; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + /** FieldOptions deprecated. */ public deprecated: boolean; @@ -17837,6 +18906,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 { @@ -17944,6 +19020,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. */ @@ -18046,6 +19129,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. */ @@ -18142,6 +19232,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. */ @@ -18244,6 +19341,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. */ @@ -18355,6 +19459,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 { @@ -18491,6 +19602,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 { @@ -18589,6 +19707,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; } } @@ -18680,6 +19805,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 { @@ -18796,6 +19928,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; } } @@ -18887,6 +20026,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 { @@ -18905,6 +20051,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. */ @@ -18928,6 +20077,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 @@ -18997,6 +20149,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 + } } } @@ -19094,6 +20263,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. */ @@ -19190,6 +20366,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. */ @@ -19286,6 +20469,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. */ @@ -19370,6 +20560,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; } /** Properties of a FieldMask. */ @@ -19460,6 +20657,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DoubleValue. */ @@ -19550,6 +20754,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FloatValue. */ @@ -19640,6 +20851,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Int64Value. */ @@ -19730,6 +20948,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UInt64Value. */ @@ -19820,6 +21045,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Int32Value. */ @@ -19910,6 +21142,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a UInt32Value. */ @@ -20000,6 +21239,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BoolValue. */ @@ -20090,6 +21336,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StringValue. */ @@ -20180,6 +21433,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BytesValue. */ @@ -20270,6 +21530,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -20382,6 +21649,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expr + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -20482,35 +21756,35 @@ export namespace google { namespace Operations { /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @param error Error, if any * @param [response] ListOperationsResponse */ type ListOperationsCallback = (error: (Error|null), response?: google.longrunning.ListOperationsResponse) => void; /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @param error Error, if any * @param [response] Operation */ type GetOperationCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @param error Error, if any * @param [response] Empty */ type DeleteOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @param error Error, if any * @param [response] Empty */ type CancelOperationCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @param error Error, if any * @param [response] Operation */ @@ -20632,6 +21906,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -20722,6 +22003,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -20830,6 +22118,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -20926,6 +22221,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -21016,6 +22318,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -21106,6 +22415,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -21202,6 +22518,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -21298,6 +22621,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -21404,6 +22734,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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index a7c180f6ca9..dcea34ac820 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -349,80 +349,97 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.decode(reader, reader.uint32()); - break; - case 4: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.keySpec = $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); - break; - case 6: - message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.decode(reader, reader.uint32()); - break; - case 7: - message.tier = reader.int32(); - break; - case 8: - message.state = reader.int32(); - break; - case 9: - if (!(message.pemCaCertificates && message.pemCaCertificates.length)) - message.pemCaCertificates = []; - message.pemCaCertificates.push(reader.string()); - break; - case 10: - if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) - message.caCertificateDescriptions = []; - message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1.CertificateDescription.decode(reader, reader.uint32())); - break; - case 11: - message.gcsBucket = reader.string(); - break; - case 12: - message.accessUrls = $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); - break; - case 13: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 15: - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 16: - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 17: - 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.type = reader.int32(); + break; + } + case 3: { + message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.keySpec = $root.google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); + break; + } + case 6: { + message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.tier = reader.int32(); + break; + } + case 8: { + message.state = reader.int32(); + break; + } + case 9: { + if (!(message.pemCaCertificates && message.pemCaCertificates.length)) + message.pemCaCertificates = []; + message.pemCaCertificates.push(reader.string()); + break; + } + case 10: { + if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) + message.caCertificateDescriptions = []; + message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1.CertificateDescription.decode(reader, reader.uint32())); + break; + } + case 11: { + message.gcsBucket = reader.string(); + break; + } + case 12: { + message.accessUrls = $root.google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); + break; + } + case 13: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 15: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 16: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + 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; @@ -801,6 +818,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateAuthority + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateAuthority + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateAuthority.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateAuthority"; + }; + /** * Type enum. * @name google.cloud.security.privateca.v1.CertificateAuthority.Type @@ -944,14 +976,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.caCertificateAccessUrl = reader.string(); - break; - case 2: - if (!(message.crlAccessUrls && message.crlAccessUrls.length)) - message.crlAccessUrls = []; - message.crlAccessUrls.push(reader.string()); - break; + case 1: { + message.caCertificateAccessUrl = reader.string(); + break; + } + case 2: { + if (!(message.crlAccessUrls && message.crlAccessUrls.length)) + message.crlAccessUrls = []; + message.crlAccessUrls.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -1062,6 +1096,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AccessUrls + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessUrls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateAuthority.AccessUrls"; + }; + return AccessUrls; })(); @@ -1182,12 +1231,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cloudKmsKeyVersion = reader.string(); - break; - case 2: - message.algorithm = reader.int32(); - break; + case 1: { + message.cloudKmsKeyVersion = reader.string(); + break; + } + case 2: { + message.algorithm = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -1343,6 +1394,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyVersionSpec + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyVersionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateAuthority.KeyVersionSpec"; + }; + return KeyVersionSpec; })(); @@ -1515,40 +1581,45 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.tier = reader.int32(); - break; - case 3: - message.issuancePolicy = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.decode(reader, reader.uint32()); - break; - case 4: - message.publishingOptions = $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.decode(reader, reader.uint32()); - break; - case 5: - 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.tier = reader.int32(); + break; + } + case 3: { + message.issuancePolicy = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.decode(reader, reader.uint32()); + break; + } + case 4: { + message.publishingOptions = $root.google.cloud.security.privateca.v1.CaPool.PublishingOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + 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; @@ -1714,6 +1785,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CaPool + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaPool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool"; + }; + /** * Tier enum. * @name google.cloud.security.privateca.v1.CaPool.Tier @@ -1833,12 +1919,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.publishCaCert = reader.bool(); - break; - case 2: - message.publishCrl = reader.bool(); - break; + case 1: { + message.publishCaCert = reader.bool(); + break; + } + case 2: { + message.publishCrl = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -1937,6 +2025,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PublishingOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool.PublishingOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool.PublishingOptions"; + }; + return PublishingOptions; })(); @@ -2089,26 +2192,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.allowedKeyTypes && message.allowedKeyTypes.length)) - message.allowedKeyTypes = []; - message.allowedKeyTypes.push($root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.decode(reader, reader.uint32())); - break; - case 2: - message.maximumLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.decode(reader, reader.uint32()); - break; - case 4: - message.baselineValues = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); - break; - case 5: - message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.decode(reader, reader.uint32()); - break; - case 6: - message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.decode(reader, reader.uint32()); - break; + case 1: { + if (!(message.allowedKeyTypes && message.allowedKeyTypes.length)) + message.allowedKeyTypes = []; + message.allowedKeyTypes.push($root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.decode(reader, reader.uint32())); + break; + } + case 2: { + message.maximumLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes.decode(reader, reader.uint32()); + break; + } + case 4: { + message.baselineValues = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + } + case 5: { + message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.decode(reader, reader.uint32()); + break; + } + case 6: { + message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2282,6 +2391,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IssuancePolicy + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssuancePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool.IssuancePolicy"; + }; + IssuancePolicy.AllowedKeyType = (function() { /** @@ -2399,12 +2523,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.decode(reader, reader.uint32()); - break; - case 2: - message.ellipticCurve = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.decode(reader, reader.uint32()); - break; + case 1: { + message.rsa = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType.decode(reader, reader.uint32()); + break; + } + case 2: { + message.ellipticCurve = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2524,6 +2650,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AllowedKeyType + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedKeyType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType"; + }; + AllowedKeyType.RsaKeyType = (function() { /** @@ -2627,12 +2768,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.minModulusSize = reader.int64(); - break; - case 2: - message.maxModulusSize = reader.int64(); - break; + case 1: { + message.minModulusSize = reader.int64(); + break; + } + case 2: { + message.maxModulusSize = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -2759,6 +2902,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RsaKeyType + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RsaKeyType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.RsaKeyType"; + }; + return RsaKeyType; })(); @@ -2854,9 +3012,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.signatureAlgorithm = reader.int32(); - break; + case 1: { + message.signatureAlgorithm = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -2969,6 +3128,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EcKeyType + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EcKeyType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType"; + }; + /** * EcSignatureAlgorithm enum. * @name google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm @@ -3096,12 +3270,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.allowCsrBasedIssuance = reader.bool(); - break; - case 2: - message.allowConfigBasedIssuance = reader.bool(); - break; + case 1: { + message.allowCsrBasedIssuance = reader.bool(); + break; + } + case 2: { + message.allowConfigBasedIssuance = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -3200,6 +3376,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IssuanceModes + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssuanceModes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes"; + }; + return IssuanceModes; })(); @@ -3404,57 +3595,67 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.sequenceNumber = reader.int64(); - break; - case 3: - if (!(message.revokedCertificates && message.revokedCertificates.length)) - message.revokedCertificates = []; - message.revokedCertificates.push($root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.decode(reader, reader.uint32())); - break; - case 4: - message.pemCrl = reader.string(); - break; - case 5: - message.accessUrl = reader.string(); - break; - case 6: - message.state = reader.int32(); - break; - case 7: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.revisionId = reader.string(); - break; - case 10: - 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.sequenceNumber = reader.int64(); + break; + } + case 3: { + if (!(message.revokedCertificates && message.revokedCertificates.length)) + message.revokedCertificates = []; + message.revokedCertificates.push($root.google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate.decode(reader, reader.uint32())); + break; + } + case 4: { + message.pemCrl = reader.string(); + break; + } + case 5: { + message.accessUrl = reader.string(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.revisionId = reader.string(); + break; + } + case 10: { + 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; @@ -3692,6 +3893,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateRevocationList + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateRevocationList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateRevocationList"; + }; + CertificateRevocationList.RevokedCertificate = (function() { /** @@ -3806,15 +4022,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificate = reader.string(); - break; - case 2: - message.hexSerialNumber = reader.string(); - break; - case 3: - message.revocationReason = reader.int32(); - break; + case 1: { + message.certificate = reader.string(); + break; + } + case 2: { + message.hexSerialNumber = reader.string(); + break; + } + case 3: { + message.revocationReason = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3969,6 +4188,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RevokedCertificate + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevokedCertificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateRevocationList.RevokedCertificate"; + }; + return RevokedCertificate; })(); @@ -4244,69 +4478,83 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pemCsr = reader.string(); - break; - case 3: - message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.decode(reader, reader.uint32()); - break; - case 4: - message.issuerCertificateAuthority = reader.string(); - break; - case 5: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.certificateTemplate = reader.string(); - break; - case 7: - message.subjectMode = reader.int32(); - break; - case 8: - message.revocationDetails = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.decode(reader, reader.uint32()); - break; - case 9: - message.pemCertificate = reader.string(); - break; - case 10: - message.certificateDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.decode(reader, reader.uint32()); - break; - case 11: - if (!(message.pemCertificateChain && message.pemCertificateChain.length)) - message.pemCertificateChain = []; - message.pemCertificateChain.push(reader.string()); - break; - case 12: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 13: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 14: - 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.pemCsr = reader.string(); + break; + } + case 3: { + message.config = $root.google.cloud.security.privateca.v1.CertificateConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.issuerCertificateAuthority = reader.string(); + break; + } + case 5: { + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.certificateTemplate = reader.string(); + break; + } + case 7: { + message.subjectMode = reader.int32(); + break; + } + case 8: { + message.revocationDetails = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.decode(reader, reader.uint32()); + break; + } + case 9: { + message.pemCertificate = reader.string(); + break; + } + case 10: { + message.certificateDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.pemCertificateChain && message.pemCertificateChain.length)) + message.pemCertificateChain = []; + message.pemCertificateChain.push(reader.string()); + break; + } + case 12: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 14: { + 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; @@ -4589,6 +4837,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Certificate + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.Certificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Certificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.Certificate"; + }; + Certificate.RevocationDetails = (function() { /** @@ -4692,12 +4955,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.revocationState = reader.int32(); - break; - case 2: - message.revocationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.revocationState = reader.int32(); + break; + } + case 2: { + message.revocationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -4849,6 +5114,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RevocationDetails + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.Certificate.RevocationDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevocationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.Certificate.RevocationDetails"; + }; + return RevocationDetails; })(); @@ -5026,49 +5306,57 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.predefinedValues = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); - break; - case 3: - message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.decode(reader, reader.uint32()); - break; - case 4: - message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.decode(reader, reader.uint32()); - break; - case 5: - message.description = reader.string(); - break; - case 6: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - 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.predefinedValues = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.identityConstraints = $root.google.cloud.security.privateca.v1.CertificateIdentityConstraints.decode(reader, reader.uint32()); + break; + } + case 4: { + message.passthroughExtensions = $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.decode(reader, reader.uint32()); + break; + } + case 5: { + message.description = reader.string(); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + 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; @@ -5255,6 +5543,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateTemplate + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateTemplate"; + }; + return CertificateTemplate; })(); @@ -5400,27 +5703,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.decode(reader, reader.uint32()); - break; - case 2: - message.caOptions = $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.policyIds && message.policyIds.length)) - message.policyIds = []; - message.policyIds.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.aiaOcspServers && message.aiaOcspServers.length)) - message.aiaOcspServers = []; - message.aiaOcspServers.push(reader.string()); - break; - case 5: - if (!(message.additionalExtensions && message.additionalExtensions.length)) - message.additionalExtensions = []; - message.additionalExtensions.push($root.google.cloud.security.privateca.v1.X509Extension.decode(reader, reader.uint32())); - break; + case 1: { + message.keyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.caOptions = $root.google.cloud.security.privateca.v1.X509Parameters.CaOptions.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.policyIds && message.policyIds.length)) + message.policyIds = []; + message.policyIds.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.aiaOcspServers && message.aiaOcspServers.length)) + message.aiaOcspServers = []; + message.aiaOcspServers.push(reader.string()); + break; + } + case 5: { + if (!(message.additionalExtensions && message.additionalExtensions.length)) + message.additionalExtensions = []; + message.additionalExtensions.push($root.google.cloud.security.privateca.v1.X509Extension.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -5601,6 +5909,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for X509Parameters + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.X509Parameters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + X509Parameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.X509Parameters"; + }; + X509Parameters.CaOptions = (function() { /** @@ -5729,12 +6052,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isCa = reader.bool(); - break; - case 2: - message.maxIssuerPathLength = reader.int32(); - break; + case 1: { + message.isCa = reader.bool(); + break; + } + case 2: { + message.maxIssuerPathLength = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5840,6 +6165,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CaOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.X509Parameters.CaOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.X509Parameters.CaOptions"; + }; + return CaOptions; })(); @@ -5963,12 +6303,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateAuthority = reader.string(); - break; - case 2: - message.pemIssuerChain = $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.decode(reader, reader.uint32()); - break; + case 1: { + message.certificateAuthority = reader.string(); + break; + } + case 2: { + message.pemIssuerChain = $root.google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6082,6 +6424,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubordinateConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.SubordinateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubordinateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.SubordinateConfig"; + }; + SubordinateConfig.SubordinateConfigChain = (function() { /** @@ -6176,11 +6533,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.pemCertificates && message.pemCertificates.length)) - message.pemCertificates = []; - message.pemCertificates.push(reader.string()); - break; + case 1: { + if (!(message.pemCertificates && message.pemCertificates.length)) + message.pemCertificates = []; + message.pemCertificates.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -6282,6 +6640,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubordinateConfigChain + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubordinateConfigChain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.SubordinateConfig.SubordinateConfigChain"; + }; + return SubordinateConfigChain; })(); @@ -6391,12 +6764,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.format = reader.int32(); - break; + case 1: { + message.key = reader.bytes(); + break; + } + case 2: { + message.format = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -6461,7 +6836,7 @@ if (object.key != null) if (typeof object.key === "string") $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) + else if (object.key.length >= 0) message.key = object.key; switch (object.format) { case "KEY_FORMAT_UNSPECIFIED": @@ -6517,6 +6892,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PublicKey + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.PublicKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.PublicKey"; + }; + /** * KeyFormat enum. * @name google.cloud.security.privateca.v1.PublicKey.KeyFormat @@ -6648,15 +7038,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subjectConfig = $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.decode(reader, reader.uint32()); - break; - case 2: - message.x509Config = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); - break; - case 3: - message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.decode(reader, reader.uint32()); - break; + case 1: { + message.subjectConfig = $root.google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.x509Config = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6778,6 +7171,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateConfig"; + }; + CertificateConfig.SubjectConfig = (function() { /** @@ -6881,12 +7289,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subject = $root.google.cloud.security.privateca.v1.Subject.decode(reader, reader.uint32()); - break; - case 2: - message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.decode(reader, reader.uint32()); - break; + case 1: { + message.subject = $root.google.cloud.security.privateca.v1.Subject.decode(reader, reader.uint32()); + break; + } + case 2: { + message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -6995,6 +7405,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubjectConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubjectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateConfig.SubjectConfig"; + }; + return SubjectConfig; })(); @@ -7174,34 +7599,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subjectDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.decode(reader, reader.uint32()); - break; - case 2: - message.x509Description = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); - break; - case 3: - message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.decode(reader, reader.uint32()); - break; - case 4: - message.subjectKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.decode(reader, reader.uint32()); - break; - case 5: - message.authorityKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.crlDistributionPoints && message.crlDistributionPoints.length)) - message.crlDistributionPoints = []; - message.crlDistributionPoints.push(reader.string()); - break; - case 7: - if (!(message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length)) - message.aiaIssuingCertificateUrls = []; - message.aiaIssuingCertificateUrls.push(reader.string()); - break; - case 8: - message.certFingerprint = $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.decode(reader, reader.uint32()); - break; + case 1: { + message.subjectDescription = $root.google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription.decode(reader, reader.uint32()); + break; + } + case 2: { + message.x509Description = $root.google.cloud.security.privateca.v1.X509Parameters.decode(reader, reader.uint32()); + break; + } + case 3: { + message.publicKey = $root.google.cloud.security.privateca.v1.PublicKey.decode(reader, reader.uint32()); + break; + } + case 4: { + message.subjectKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + } + case 5: { + message.authorityKeyId = $root.google.cloud.security.privateca.v1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.crlDistributionPoints && message.crlDistributionPoints.length)) + message.crlDistributionPoints = []; + message.crlDistributionPoints.push(reader.string()); + break; + } + case 7: { + if (!(message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length)) + message.aiaIssuingCertificateUrls = []; + message.aiaIssuingCertificateUrls.push(reader.string()); + break; + } + case 8: { + message.certFingerprint = $root.google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7404,6 +7837,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateDescription + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateDescription"; + }; + CertificateDescription.SubjectDescription = (function() { /** @@ -7551,24 +7999,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subject = $root.google.cloud.security.privateca.v1.Subject.decode(reader, reader.uint32()); - break; - case 2: - message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.decode(reader, reader.uint32()); - break; - case 3: - message.hexSerialNumber = reader.string(); - break; - case 4: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.subject = $root.google.cloud.security.privateca.v1.Subject.decode(reader, reader.uint32()); + break; + } + case 2: { + message.subjectAltName = $root.google.cloud.security.privateca.v1.SubjectAltNames.decode(reader, reader.uint32()); + break; + } + case 3: { + message.hexSerialNumber = reader.string(); + break; + } + case 4: { + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -7724,6 +8178,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubjectDescription + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubjectDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateDescription.SubjectDescription"; + }; + return SubjectDescription; })(); @@ -7819,9 +8288,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyId = reader.string(); - break; + case 1: { + message.keyId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -7911,6 +8381,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyId + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateDescription.KeyId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateDescription.KeyId"; + }; + return KeyId; })(); @@ -8006,9 +8491,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sha256Hash = reader.string(); - break; + case 1: { + message.sha256Hash = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -8098,6 +8584,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateFingerprint + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateFingerprint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateDescription.CertificateFingerprint"; + }; + return CertificateFingerprint; })(); @@ -8201,16 +8702,17 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.objectIdPath && message.objectIdPath.length)) - message.objectIdPath = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.objectIdPath && message.objectIdPath.length)) + message.objectIdPath = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.objectIdPath.push(reader.int32()); + } else message.objectIdPath.push(reader.int32()); - } else - message.objectIdPath.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -8312,6 +8814,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ObjectId + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ObjectId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ObjectId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ObjectId"; + }; + return ObjectId; })(); @@ -8429,15 +8946,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.objectId = $root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32()); - break; - case 2: - message.critical = reader.bool(); - break; - case 3: - message.value = reader.bytes(); - break; + case 1: { + message.objectId = $root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32()); + break; + } + case 2: { + message.critical = reader.bool(); + break; + } + case 3: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -8509,7 +9029,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; }; @@ -8558,6 +9078,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for X509Extension + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.X509Extension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + X509Extension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.X509Extension"; + }; + return X509Extension; })(); @@ -8677,17 +9212,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.decode(reader, reader.uint32()); - break; - case 2: - message.extendedKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length)) - message.unknownExtendedKeyUsages = []; - message.unknownExtendedKeyUsages.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); - break; + case 1: { + message.baseKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions.decode(reader, reader.uint32()); + break; + } + case 2: { + message.extendedKeyUsage = $root.google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length)) + message.unknownExtendedKeyUsages = []; + message.unknownExtendedKeyUsages.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8822,6 +9360,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyUsage + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.KeyUsage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyUsage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.KeyUsage"; + }; + KeyUsage.KeyUsageOptions = (function() { /** @@ -9002,33 +9555,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.digitalSignature = reader.bool(); - break; - case 2: - message.contentCommitment = reader.bool(); - break; - case 3: - message.keyEncipherment = reader.bool(); - break; - case 4: - message.dataEncipherment = reader.bool(); - break; - case 5: - message.keyAgreement = reader.bool(); - break; - case 6: - message.certSign = reader.bool(); - break; - case 7: - message.crlSign = reader.bool(); - break; - case 8: - message.encipherOnly = reader.bool(); - break; - case 9: - message.decipherOnly = reader.bool(); - break; + case 1: { + message.digitalSignature = reader.bool(); + break; + } + case 2: { + message.contentCommitment = reader.bool(); + break; + } + case 3: { + message.keyEncipherment = reader.bool(); + break; + } + case 4: { + message.dataEncipherment = reader.bool(); + break; + } + case 5: { + message.keyAgreement = reader.bool(); + break; + } + case 6: { + message.certSign = reader.bool(); + break; + } + case 7: { + message.crlSign = reader.bool(); + break; + } + case 8: { + message.encipherOnly = reader.bool(); + break; + } + case 9: { + message.decipherOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9183,6 +9745,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyUsageOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyUsageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions"; + }; + return KeyUsageOptions; })(); @@ -9333,24 +9910,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serverAuth = reader.bool(); - break; - case 2: - message.clientAuth = reader.bool(); - break; - case 3: - message.codeSigning = reader.bool(); - break; - case 4: - message.emailProtection = reader.bool(); - break; - case 5: - message.timeStamping = reader.bool(); - break; - case 6: - message.ocspSigning = reader.bool(); - break; + case 1: { + message.serverAuth = reader.bool(); + break; + } + case 2: { + message.clientAuth = reader.bool(); + break; + } + case 3: { + message.codeSigning = reader.bool(); + break; + } + case 4: { + message.emailProtection = reader.bool(); + break; + } + case 5: { + message.timeStamping = reader.bool(); + break; + } + case 6: { + message.ocspSigning = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -9481,6 +10064,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtendedKeyUsageOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtendedKeyUsageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions"; + }; + return ExtendedKeyUsageOptions; })(); @@ -9656,30 +10254,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.commonName = reader.string(); - break; - case 2: - message.countryCode = reader.string(); - break; - case 3: - message.organization = reader.string(); - break; - case 4: - message.organizationalUnit = reader.string(); - break; - case 5: - message.locality = reader.string(); - break; - case 6: - message.province = reader.string(); - break; - case 7: - message.streetAddress = reader.string(); - break; - case 8: - message.postalCode = reader.string(); - break; + case 1: { + message.commonName = reader.string(); + break; + } + case 2: { + message.countryCode = reader.string(); + break; + } + case 3: { + message.organization = reader.string(); + break; + } + case 4: { + message.organizationalUnit = reader.string(); + break; + } + case 5: { + message.locality = reader.string(); + break; + } + case 6: { + message.province = reader.string(); + break; + } + case 7: { + message.streetAddress = reader.string(); + break; + } + case 8: { + message.postalCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -9826,6 +10432,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Subject + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.Subject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.Subject"; + }; + return Subject; })(); @@ -9975,31 +10596,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dnsNames && message.dnsNames.length)) - message.dnsNames = []; - message.dnsNames.push(reader.string()); - break; - case 2: - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); - break; - case 3: - if (!(message.emailAddresses && message.emailAddresses.length)) - message.emailAddresses = []; - message.emailAddresses.push(reader.string()); - break; - case 4: - if (!(message.ipAddresses && message.ipAddresses.length)) - message.ipAddresses = []; - message.ipAddresses.push(reader.string()); - break; - case 5: - if (!(message.customSans && message.customSans.length)) - message.customSans = []; - message.customSans.push($root.google.cloud.security.privateca.v1.X509Extension.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.dnsNames && message.dnsNames.length)) + message.dnsNames = []; + message.dnsNames.push(reader.string()); + break; + } + case 2: { + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + } + case 3: { + if (!(message.emailAddresses && message.emailAddresses.length)) + message.emailAddresses = []; + message.emailAddresses.push(reader.string()); + break; + } + case 4: { + if (!(message.ipAddresses && message.ipAddresses.length)) + message.ipAddresses = []; + message.ipAddresses.push(reader.string()); + break; + } + case 5: { + if (!(message.customSans && message.customSans.length)) + message.customSans = []; + message.customSans.push($root.google.cloud.security.privateca.v1.X509Extension.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10187,6 +10813,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubjectAltNames + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.SubjectAltNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubjectAltNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.SubjectAltNames"; + }; + return SubjectAltNames; })(); @@ -10329,15 +10970,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.celExpression = $root.google.type.Expr.decode(reader, reader.uint32()); - break; - case 2: - message.allowSubjectPassthrough = reader.bool(); - break; - case 3: - message.allowSubjectAltNamesPassthrough = reader.bool(); - break; + case 1: { + message.celExpression = $root.google.type.Expr.decode(reader, reader.uint32()); + break; + } + case 2: { + message.allowSubjectPassthrough = reader.bool(); + break; + } + case 3: { + message.allowSubjectAltNamesPassthrough = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -10457,6 +11101,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateIdentityConstraints + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateIdentityConstraints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateIdentityConstraints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateIdentityConstraints"; + }; + return CertificateIdentityConstraints; })(); @@ -10570,21 +11229,23 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.knownExtensions && message.knownExtensions.length)) - message.knownExtensions = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.knownExtensions && message.knownExtensions.length)) + message.knownExtensions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.knownExtensions.push(reader.int32()); + } else message.knownExtensions.push(reader.int32()); - } else - message.knownExtensions.push(reader.int32()); - break; - case 2: - if (!(message.additionalExtensions && message.additionalExtensions.length)) - message.additionalExtensions = []; - message.additionalExtensions.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); - break; + break; + } + case 2: { + if (!(message.additionalExtensions && message.additionalExtensions.length)) + message.additionalExtensions = []; + message.additionalExtensions.push($root.google.cloud.security.privateca.v1.ObjectId.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -10747,6 +11408,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateExtensionConstraints + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CertificateExtensionConstraints + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateExtensionConstraints.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CertificateExtensionConstraints"; + }; + /** * KnownCertificateExtension enum. * @name google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension @@ -10849,7 +11525,7 @@ }; /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCertificate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef CreateCertificateCallback * @type {function} @@ -10882,7 +11558,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef GetCertificateCallback * @type {function} @@ -10915,7 +11591,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificates}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificates}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef ListCertificatesCallback * @type {function} @@ -10948,7 +11624,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#revokeCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|revokeCertificate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef RevokeCertificateCallback * @type {function} @@ -10981,7 +11657,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef UpdateCertificateCallback * @type {function} @@ -11014,7 +11690,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#activateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|activateCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef ActivateCertificateAuthorityCallback * @type {function} @@ -11047,7 +11723,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef CreateCertificateAuthorityCallback * @type {function} @@ -11080,7 +11756,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#disableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|disableCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef DisableCertificateAuthorityCallback * @type {function} @@ -11113,7 +11789,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#enableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|enableCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef EnableCertificateAuthorityCallback * @type {function} @@ -11146,7 +11822,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|fetchCertificateAuthorityCsr}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef FetchCertificateAuthorityCsrCallback * @type {function} @@ -11179,7 +11855,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef GetCertificateAuthorityCallback * @type {function} @@ -11212,7 +11888,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateAuthorities}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificateAuthorities}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef ListCertificateAuthoritiesCallback * @type {function} @@ -11245,7 +11921,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#undeleteCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|undeleteCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef UndeleteCertificateAuthorityCallback * @type {function} @@ -11278,7 +11954,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|deleteCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef DeleteCertificateAuthorityCallback * @type {function} @@ -11311,7 +11987,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificateAuthority}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef UpdateCertificateAuthorityCallback * @type {function} @@ -11344,7 +12020,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCaPool}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef CreateCaPoolCallback * @type {function} @@ -11377,7 +12053,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCaPool}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef UpdateCaPoolCallback * @type {function} @@ -11410,7 +12086,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCaPool}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef GetCaPoolCallback * @type {function} @@ -11443,7 +12119,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCaPools}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCaPools}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef ListCaPoolsCallback * @type {function} @@ -11476,7 +12152,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCaPool}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|deleteCaPool}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef DeleteCaPoolCallback * @type {function} @@ -11509,7 +12185,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#fetchCaCerts}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|fetchCaCerts}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef FetchCaCertsCallback * @type {function} @@ -11542,7 +12218,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificateRevocationList}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef GetCertificateRevocationListCallback * @type {function} @@ -11575,7 +12251,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateRevocationLists}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificateRevocationLists}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef ListCertificateRevocationListsCallback * @type {function} @@ -11608,7 +12284,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificateRevocationList}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef UpdateCertificateRevocationListCallback * @type {function} @@ -11641,7 +12317,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#createCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|createCertificateTemplate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef CreateCertificateTemplateCallback * @type {function} @@ -11674,7 +12350,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#deleteCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|deleteCertificateTemplate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef DeleteCertificateTemplateCallback * @type {function} @@ -11707,7 +12383,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#getCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|getCertificateTemplate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef GetCertificateTemplateCallback * @type {function} @@ -11740,7 +12416,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#listCertificateTemplates}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|listCertificateTemplates}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef ListCertificateTemplatesCallback * @type {function} @@ -11773,7 +12449,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService#updateCertificateTemplate}. + * Callback as used by {@link google.cloud.security.privateca.v1.CertificateAuthorityService|updateCertificateTemplate}. * @memberof google.cloud.security.privateca.v1.CertificateAuthorityService * @typedef UpdateCertificateTemplateCallback * @type {function} @@ -11955,24 +12631,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.certificateId = reader.string(); - break; - case 3: - message.certificate = $root.google.cloud.security.privateca.v1.Certificate.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; - case 5: - message.validateOnly = reader.bool(); - break; - case 6: - message.issuingCertificateAuthorityId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.certificateId = reader.string(); + break; + } + case 3: { + message.certificate = $root.google.cloud.security.privateca.v1.Certificate.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + case 5: { + message.validateOnly = reader.bool(); + break; + } + case 6: { + message.issuingCertificateAuthorityId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -12108,6 +12790,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CreateCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CreateCertificateRequest"; + }; + return CreateCertificateRequest; })(); @@ -12203,9 +12900,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; @@ -12295,6 +12993,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.GetCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.GetCertificateRequest"; + }; + return GetCertificateRequest; })(); @@ -12434,21 +13147,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; @@ -12571,6 +13289,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificatesRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificatesRequest"; + }; + return ListCertificatesRequest; })(); @@ -12692,19 +13425,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificates && message.certificates.length)) - message.certificates = []; - message.certificates.push($root.google.cloud.security.privateca.v1.Certificate.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.certificates && message.certificates.length)) + message.certificates = []; + message.certificates.push($root.google.cloud.security.privateca.v1.Certificate.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; @@ -12841,6 +13577,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificatesResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificatesResponse"; + }; + return ListCertificatesResponse; })(); @@ -12958,15 +13709,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.reason = reader.int32(); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.reason = reader.int32(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13121,6 +13875,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RevokeCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.RevokeCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevokeCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.RevokeCertificateRequest"; + }; + return RevokeCertificateRequest; })(); @@ -13238,15 +14007,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificate = $root.google.cloud.security.privateca.v1.Certificate.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificate = $root.google.cloud.security.privateca.v1.Certificate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13363,6 +14135,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.UpdateCertificateRequest"; + }; + return UpdateCertificateRequest; })(); @@ -13491,18 +14278,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pemCaCertificate = reader.string(); - break; - case 3: - message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pemCaCertificate = reader.string(); + break; + } + case 3: { + message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13622,6 +14413,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ActivateCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest"; + }; + return ActivateCertificateAuthorityRequest; })(); @@ -13750,18 +14556,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.certificateAuthorityId = reader.string(); - break; - case 3: - message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.certificateAuthorityId = reader.string(); + break; + } + case 3: { + message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -13881,6 +14691,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest"; + }; + return CreateCertificateAuthorityRequest; })(); @@ -13987,12 +14812,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14091,6 +14918,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DisableCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisableCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest"; + }; + return DisableCertificateAuthorityRequest; })(); @@ -14197,12 +15039,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14301,6 +15145,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnableCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnableCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest"; + }; + return EnableCertificateAuthorityRequest; })(); @@ -14396,9 +15255,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; @@ -14488,6 +15348,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchCertificateAuthorityCsrRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchCertificateAuthorityCsrRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest"; + }; + return FetchCertificateAuthorityCsrRequest; })(); @@ -14583,9 +15458,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pemCsr = reader.string(); - break; + case 1: { + message.pemCsr = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -14675,6 +15551,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchCertificateAuthorityCsrResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchCertificateAuthorityCsrResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse"; + }; + return FetchCertificateAuthorityCsrResponse; })(); @@ -14770,9 +15661,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; @@ -14862,6 +15754,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.GetCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.GetCertificateAuthorityRequest"; + }; + return GetCertificateAuthorityRequest; })(); @@ -15001,21 +15908,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; @@ -15138,6 +16050,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateAuthoritiesRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateAuthoritiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest"; + }; + return ListCertificateAuthoritiesRequest; })(); @@ -15259,19 +16186,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificateAuthorities && message.certificateAuthorities.length)) - message.certificateAuthorities = []; - message.certificateAuthorities.push($root.google.cloud.security.privateca.v1.CertificateAuthority.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.certificateAuthorities && message.certificateAuthorities.length)) + message.certificateAuthorities = []; + message.certificateAuthorities.push($root.google.cloud.security.privateca.v1.CertificateAuthority.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; @@ -15408,6 +16338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateAuthoritiesResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateAuthoritiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificateAuthoritiesResponse"; + }; + return ListCertificateAuthoritiesResponse; })(); @@ -15514,12 +16459,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -15618,6 +16565,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UndeleteCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UndeleteCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest"; + }; + return UndeleteCertificateAuthorityRequest; })(); @@ -15746,18 +16708,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; - case 4: - message.ignoreActiveCertificates = reader.bool(); - break; - case 5: - message.skipGracePeriod = reader.bool(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 4: { + message.ignoreActiveCertificates = reader.bool(); + break; + } + case 5: { + message.skipGracePeriod = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -15872,6 +16838,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest"; + }; + return DeleteCertificateAuthorityRequest; })(); @@ -15989,15 +16970,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificateAuthority = $root.google.cloud.security.privateca.v1.CertificateAuthority.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16114,6 +17098,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest"; + }; + return UpdateCertificateAuthorityRequest; })(); @@ -16242,18 +17241,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.caPoolId = reader.string(); - break; - case 3: - message.caPool = $root.google.cloud.security.privateca.v1.CaPool.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.caPoolId = reader.string(); + break; + } + case 3: { + message.caPool = $root.google.cloud.security.privateca.v1.CaPool.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16373,6 +17376,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCaPoolRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CreateCaPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCaPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CreateCaPoolRequest"; + }; + return CreateCaPoolRequest; })(); @@ -16490,15 +17508,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.caPool = $root.google.cloud.security.privateca.v1.CaPool.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.caPool = $root.google.cloud.security.privateca.v1.CaPool.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16615,6 +17636,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCaPoolRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.UpdateCaPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCaPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.UpdateCaPoolRequest"; + }; + return UpdateCaPoolRequest; })(); @@ -16721,12 +17757,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -16825,6 +17863,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteCaPoolRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.DeleteCaPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteCaPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.DeleteCaPoolRequest"; + }; + return DeleteCaPoolRequest; })(); @@ -16931,12 +17984,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.caPool = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.caPool = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -17035,6 +18090,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchCaCertsRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.FetchCaCertsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchCaCertsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.FetchCaCertsRequest"; + }; + return FetchCaCertsRequest; })(); @@ -17132,11 +18202,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.caCerts && message.caCerts.length)) - message.caCerts = []; - message.caCerts.push($root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.caCerts && message.caCerts.length)) + message.caCerts = []; + message.caCerts.push($root.google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -17243,6 +18314,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchCaCertsResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchCaCertsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.FetchCaCertsResponse"; + }; + FetchCaCertsResponse.CertChain = (function() { /** @@ -17337,11 +18423,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificates && message.certificates.length)) - message.certificates = []; - message.certificates.push(reader.string()); - break; + case 1: { + if (!(message.certificates && message.certificates.length)) + message.certificates = []; + message.certificates.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -17443,6 +18530,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertChain + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertChain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.FetchCaCertsResponse.CertChain"; + }; + return CertChain; })(); @@ -17541,9 +18643,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; @@ -17633,6 +18736,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCaPoolRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.GetCaPoolRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCaPoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.GetCaPoolRequest"; + }; + return GetCaPoolRequest; })(); @@ -17772,21 +18890,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; @@ -17909,6 +19032,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCaPoolsRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCaPoolsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCaPoolsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCaPoolsRequest"; + }; + return ListCaPoolsRequest; })(); @@ -18030,19 +19168,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.caPools && message.caPools.length)) - message.caPools = []; - message.caPools.push($root.google.cloud.security.privateca.v1.CaPool.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.caPools && message.caPools.length)) + message.caPools = []; + message.caPools.push($root.google.cloud.security.privateca.v1.CaPool.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; @@ -18179,6 +19320,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCaPoolsResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCaPoolsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCaPoolsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCaPoolsResponse"; + }; + return ListCaPoolsResponse; })(); @@ -18274,9 +19430,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; @@ -18366,6 +19523,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateRevocationListRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.GetCertificateRevocationListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateRevocationListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.GetCertificateRevocationListRequest"; + }; + return GetCertificateRevocationListRequest; })(); @@ -18505,21 +19677,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; @@ -18642,6 +19819,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateRevocationListsRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateRevocationListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest"; + }; + return ListCertificateRevocationListsRequest; })(); @@ -18763,19 +19955,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificateRevocationLists && message.certificateRevocationLists.length)) - message.certificateRevocationLists = []; - message.certificateRevocationLists.push($root.google.cloud.security.privateca.v1.CertificateRevocationList.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.certificateRevocationLists && message.certificateRevocationLists.length)) + message.certificateRevocationLists = []; + message.certificateRevocationLists.push($root.google.cloud.security.privateca.v1.CertificateRevocationList.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; @@ -18912,6 +20107,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateRevocationListsResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateRevocationListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificateRevocationListsResponse"; + }; + return ListCertificateRevocationListsResponse; })(); @@ -19029,15 +20239,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateRevocationList = $root.google.cloud.security.privateca.v1.CertificateRevocationList.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificateRevocationList = $root.google.cloud.security.privateca.v1.CertificateRevocationList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19154,6 +20367,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateRevocationListRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateRevocationListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest"; + }; + return UpdateCertificateRevocationListRequest; })(); @@ -19282,18 +20510,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.certificateTemplateId = reader.string(); - break; - case 3: - message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.certificateTemplateId = reader.string(); + break; + } + case 3: { + message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19413,6 +20645,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCertificateTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.CreateCertificateTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCertificateTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.CreateCertificateTemplateRequest"; + }; + return CreateCertificateTemplateRequest; })(); @@ -19519,12 +20766,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -19623,6 +20872,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteCertificateTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteCertificateTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest"; + }; + return DeleteCertificateTemplateRequest; })(); @@ -19718,9 +20982,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; @@ -19810,6 +21075,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.GetCertificateTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.GetCertificateTemplateRequest"; + }; + return GetCertificateTemplateRequest; })(); @@ -19949,21 +21229,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; @@ -20086,6 +21371,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateTemplatesRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateTemplatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificateTemplatesRequest"; + }; + return ListCertificateTemplatesRequest; })(); @@ -20207,19 +21507,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificateTemplates && message.certificateTemplates.length)) - message.certificateTemplates = []; - message.certificateTemplates.push($root.google.cloud.security.privateca.v1.CertificateTemplate.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.certificateTemplates && message.certificateTemplates.length)) + message.certificateTemplates = []; + message.certificateTemplates.push($root.google.cloud.security.privateca.v1.CertificateTemplate.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; @@ -20356,6 +21659,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateTemplatesResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.ListCertificateTemplatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateTemplatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.ListCertificateTemplatesResponse"; + }; + return ListCertificateTemplatesResponse; })(); @@ -20473,15 +21791,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificateTemplate = $root.google.cloud.security.privateca.v1.CertificateTemplate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20598,6 +21919,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateTemplateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest"; + }; + return UpdateCertificateTemplateRequest; })(); @@ -20759,27 +22095,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.target = reader.string(); - break; - case 4: - message.verb = reader.string(); - break; - case 5: - message.statusMessage = reader.string(); - break; - case 6: - message.requestedCancellation = reader.bool(); - break; - case 7: - message.apiVersion = reader.string(); - break; + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -20928,6 +22271,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1.OperationMetadata"; + }; + return OperationMetadata; })(); @@ -21228,83 +22586,101 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.type = reader.int32(); - break; - case 3: - message.tier = reader.int32(); - break; - case 4: - message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); - break; - case 5: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); - break; - case 7: - message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.decode(reader, reader.uint32()); - break; - case 8: - message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.decode(reader, reader.uint32()); - break; - case 19: - message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); - break; - case 10: - message.state = reader.int32(); - break; - case 9: - if (!(message.pemCaCertificates && message.pemCaCertificates.length)) - message.pemCaCertificates = []; - message.pemCaCertificates.push(reader.string()); - break; - case 12: - if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) - message.caCertificateDescriptions = []; - message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32())); - break; - case 13: - message.gcsBucket = reader.string(); - break; - case 14: - message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); - break; - case 15: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 16: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 17: - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 18: - 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.type = reader.int32(); + break; + } + case 3: { + message.tier = reader.int32(); + break; + } + case 4: { + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.keySpec = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec.decode(reader, reader.uint32()); + break; + } + case 7: { + message.certificatePolicy = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.decode(reader, reader.uint32()); + break; + } + case 8: { + message.issuingOptions = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions.decode(reader, reader.uint32()); + break; + } + case 19: { + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.state = reader.int32(); + break; + } + case 9: { + if (!(message.pemCaCertificates && message.pemCaCertificates.length)) + message.pemCaCertificates = []; + message.pemCaCertificates.push(reader.string()); + break; + } + case 12: { + if (!(message.caCertificateDescriptions && message.caCertificateDescriptions.length)) + message.caCertificateDescriptions = []; + message.caCertificateDescriptions.push($root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32())); + break; + } + case 13: { + message.gcsBucket = reader.string(); + break; + } + case 14: { + message.accessUrls = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls.decode(reader, reader.uint32()); + break; + } + case 15: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 16: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 18: { + 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; @@ -21691,6 +23067,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateAuthority + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateAuthority.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority"; + }; + CertificateAuthority.IssuingOptions = (function() { /** @@ -21794,12 +23185,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.includeCaCertUrl = reader.bool(); - break; - case 2: - message.includeCrlAccessUrl = reader.bool(); - break; + case 1: { + message.includeCaCertUrl = reader.bool(); + break; + } + case 2: { + message.includeCrlAccessUrl = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -21898,6 +23291,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IssuingOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssuingOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.IssuingOptions"; + }; + return IssuingOptions; })(); @@ -22077,31 +23485,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.allowedConfigList = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.decode(reader, reader.uint32()); - break; - case 2: - message.overwriteConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.allowedLocationsAndOrganizations && message.allowedLocationsAndOrganizations.length)) - message.allowedLocationsAndOrganizations = []; - message.allowedLocationsAndOrganizations.push($root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.allowedCommonNames && message.allowedCommonNames.length)) - message.allowedCommonNames = []; - message.allowedCommonNames.push(reader.string()); - break; - case 5: - message.allowedSans = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.decode(reader, reader.uint32()); - break; - case 6: - message.maximumLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 8: - message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.decode(reader, reader.uint32()); - break; + case 1: { + message.allowedConfigList = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.overwriteConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.allowedLocationsAndOrganizations && message.allowedLocationsAndOrganizations.length)) + message.allowedLocationsAndOrganizations = []; + message.allowedLocationsAndOrganizations.push($root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.allowedCommonNames && message.allowedCommonNames.length)) + message.allowedCommonNames = []; + message.allowedCommonNames.push(reader.string()); + break; + } + case 5: { + message.allowedSans = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames.decode(reader, reader.uint32()); + break; + } + case 6: { + message.maximumLifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 8: { + message.allowedIssuanceModes = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -22309,6 +23724,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateAuthorityPolicy + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateAuthorityPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy"; + }; + CertificateAuthorityPolicy.AllowedConfigList = (function() { /** @@ -22403,11 +23833,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.allowedConfigValues && message.allowedConfigValues.length)) - message.allowedConfigValues = []; - message.allowedConfigValues.push($root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.allowedConfigValues && message.allowedConfigValues.length)) + message.allowedConfigValues = []; + message.allowedConfigValues.push($root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -22514,6 +23945,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AllowedConfigList + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedConfigList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedConfigList"; + }; + return AllowedConfigList; })(); @@ -22672,32 +24118,38 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.allowedDnsNames && message.allowedDnsNames.length)) - message.allowedDnsNames = []; - message.allowedDnsNames.push(reader.string()); - break; - case 2: - if (!(message.allowedUris && message.allowedUris.length)) - message.allowedUris = []; - message.allowedUris.push(reader.string()); - break; - case 3: - if (!(message.allowedEmailAddresses && message.allowedEmailAddresses.length)) - message.allowedEmailAddresses = []; - message.allowedEmailAddresses.push(reader.string()); - break; - case 4: - if (!(message.allowedIps && message.allowedIps.length)) - message.allowedIps = []; - message.allowedIps.push(reader.string()); - break; - case 5: - message.allowGlobbingDnsWildcards = reader.bool(); - break; - case 6: - message.allowCustomSans = reader.bool(); - break; + case 1: { + if (!(message.allowedDnsNames && message.allowedDnsNames.length)) + message.allowedDnsNames = []; + message.allowedDnsNames.push(reader.string()); + break; + } + case 2: { + if (!(message.allowedUris && message.allowedUris.length)) + message.allowedUris = []; + message.allowedUris.push(reader.string()); + break; + } + case 3: { + if (!(message.allowedEmailAddresses && message.allowedEmailAddresses.length)) + message.allowedEmailAddresses = []; + message.allowedEmailAddresses.push(reader.string()); + break; + } + case 4: { + if (!(message.allowedIps && message.allowedIps.length)) + message.allowedIps = []; + message.allowedIps.push(reader.string()); + break; + } + case 5: { + message.allowGlobbingDnsWildcards = reader.bool(); + break; + } + case 6: { + message.allowCustomSans = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -22878,6 +24330,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AllowedSubjectAltNames + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedSubjectAltNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.AllowedSubjectAltNames"; + }; + return AllowedSubjectAltNames; })(); @@ -22984,12 +24451,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.allowCsrBasedIssuance = reader.bool(); - break; - case 2: - message.allowConfigBasedIssuance = reader.bool(); - break; + case 1: { + message.allowCsrBasedIssuance = reader.bool(); + break; + } + case 2: { + message.allowConfigBasedIssuance = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -23088,6 +24557,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for IssuanceModes + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IssuanceModes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.CertificateAuthorityPolicy.IssuanceModes"; + }; + return IssuanceModes; })(); @@ -23197,12 +24681,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.caCertificateAccessUrl = reader.string(); - break; - case 2: - message.crlAccessUrl = reader.string(); - break; + case 1: { + message.caCertificateAccessUrl = reader.string(); + break; + } + case 2: { + message.crlAccessUrl = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -23301,6 +24787,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for AccessUrls + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessUrls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.AccessUrls"; + }; + return AccessUrls; })(); @@ -23421,12 +24922,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.cloudKmsKeyVersion = reader.string(); - break; - case 2: - message.algorithm = reader.int32(); - break; + case 1: { + message.cloudKmsKeyVersion = reader.string(); + break; + } + case 2: { + message.algorithm = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -23582,6 +25085,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyVersionSpec + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyVersionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateAuthority.KeyVersionSpec"; + }; + return KeyVersionSpec; })(); @@ -23852,54 +25370,63 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.sequenceNumber = reader.int64(); - break; - case 3: - if (!(message.revokedCertificates && message.revokedCertificates.length)) - message.revokedCertificates = []; - message.revokedCertificates.push($root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.decode(reader, reader.uint32())); - break; - case 4: - message.pemCrl = reader.string(); - break; - case 5: - message.accessUrl = reader.string(); - break; - case 6: - message.state = reader.int32(); - break; - case 7: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 8: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - 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.sequenceNumber = reader.int64(); + break; + } + case 3: { + if (!(message.revokedCertificates && message.revokedCertificates.length)) + message.revokedCertificates = []; + message.revokedCertificates.push($root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate.decode(reader, reader.uint32())); + break; + } + case 4: { + message.pemCrl = reader.string(); + break; + } + case 5: { + message.accessUrl = reader.string(); + break; + } + case 6: { + message.state = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + 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; @@ -24129,6 +25656,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateRevocationList + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateRevocationList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateRevocationList"; + }; + CertificateRevocationList.RevokedCertificate = (function() { /** @@ -24243,15 +25785,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificate = reader.string(); - break; - case 2: - message.hexSerialNumber = reader.string(); - break; - case 3: - message.revocationReason = reader.int32(); - break; + case 1: { + message.certificate = reader.string(); + break; + } + case 2: { + message.hexSerialNumber = reader.string(); + break; + } + case 3: { + message.revocationReason = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -24406,6 +25951,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RevokedCertificate + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevokedCertificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateRevocationList.RevokedCertificate"; + }; + return RevokedCertificate; })(); @@ -24648,60 +26208,71 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pemCsr = reader.string(); - break; - case 3: - message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); - break; - case 4: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.revocationDetails = $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.decode(reader, reader.uint32()); - break; - case 6: - message.pemCertificate = reader.string(); - break; - case 7: - message.certificateDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32()); - break; - case 8: - if (!(message.pemCertificateChain && message.pemCertificateChain.length)) - message.pemCertificateChain = []; - message.pemCertificateChain.push(reader.string()); - break; - case 9: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 11: - 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.pemCsr = reader.string(); + break; + } + case 3: { + message.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 5: { + message.revocationDetails = $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails.decode(reader, reader.uint32()); + break; + } + case 6: { + message.pemCertificate = reader.string(); + break; + } + case 7: { + message.certificateDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.decode(reader, reader.uint32()); + break; + } + case 8: { + if (!(message.pemCertificateChain && message.pemCertificateChain.length)) + message.pemCertificateChain = []; + message.pemCertificateChain.push(reader.string()); + break; + } + case 9: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + 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; @@ -24942,6 +26513,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Certificate + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.Certificate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Certificate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.Certificate"; + }; + Certificate.RevocationDetails = (function() { /** @@ -25045,12 +26631,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.revocationState = reader.int32(); - break; - case 2: - message.revocationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.revocationState = reader.int32(); + break; + } + case 2: { + message.revocationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25202,6 +26790,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RevocationDetails + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevocationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails"; + }; + return RevocationDetails; })(); @@ -25357,43 +26960,49 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.values = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 5: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.values = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } } + message.labels[key] = value; + break; } - message.labels[key] = value; - break; default: reader.skipType(tag & 7); break; @@ -25554,6 +27163,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReusableConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReusableConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ReusableConfig"; + }; + return ReusableConfig; })(); @@ -25699,27 +27323,32 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.decode(reader, reader.uint32()); - break; - case 2: - message.caOptions = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.policyIds && message.policyIds.length)) - message.policyIds = []; - message.policyIds.push($root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.aiaOcspServers && message.aiaOcspServers.length)) - message.aiaOcspServers = []; - message.aiaOcspServers.push(reader.string()); - break; - case 5: - if (!(message.additionalExtensions && message.additionalExtensions.length)) - message.additionalExtensions = []; - message.additionalExtensions.push($root.google.cloud.security.privateca.v1beta1.X509Extension.decode(reader, reader.uint32())); - break; + case 1: { + message.keyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.decode(reader, reader.uint32()); + break; + } + case 2: { + message.caOptions = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.policyIds && message.policyIds.length)) + message.policyIds = []; + message.policyIds.push($root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.aiaOcspServers && message.aiaOcspServers.length)) + message.aiaOcspServers = []; + message.aiaOcspServers.push(reader.string()); + break; + } + case 5: { + if (!(message.additionalExtensions && message.additionalExtensions.length)) + message.additionalExtensions = []; + message.additionalExtensions.push($root.google.cloud.security.privateca.v1beta1.X509Extension.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -25900,6 +27529,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReusableConfigValues + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReusableConfigValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ReusableConfigValues"; + }; + ReusableConfigValues.CaOptions = (function() { /** @@ -26003,12 +27647,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.isCa = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); - break; - case 2: - message.maxIssuerPathLength = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); - break; + case 1: { + message.isCa = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.maxIssuerPathLength = $root.google.protobuf.Int32Value.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26117,6 +27763,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CaOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CaOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ReusableConfigValues.CaOptions"; + }; + return CaOptions; })(); @@ -26240,12 +27901,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.reusableConfig = reader.string(); - break; - case 2: - message.reusableConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); - break; + case 1: { + message.reusableConfig = reader.string(); + break; + } + case 2: { + message.reusableConfigValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26359,6 +28022,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReusableConfigWrapper + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ReusableConfigWrapper + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReusableConfigWrapper.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ReusableConfigWrapper"; + }; + return ReusableConfigWrapper; })(); @@ -26479,12 +28157,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateAuthority = reader.string(); - break; - case 2: - message.pemIssuerChain = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.decode(reader, reader.uint32()); - break; + case 1: { + message.certificateAuthority = reader.string(); + break; + } + case 2: { + message.pemIssuerChain = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -26598,6 +28278,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubordinateConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubordinateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.SubordinateConfig"; + }; + SubordinateConfig.SubordinateConfigChain = (function() { /** @@ -26692,11 +28387,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.pemCertificates && message.pemCertificates.length)) - message.pemCertificates = []; - message.pemCertificates.push(reader.string()); - break; + case 1: { + if (!(message.pemCertificates && message.pemCertificates.length)) + message.pemCertificates = []; + message.pemCertificates.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -26798,6 +28494,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubordinateConfigChain + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubordinateConfigChain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.SubordinateConfig.SubordinateConfigChain"; + }; + return SubordinateConfigChain; })(); @@ -26907,12 +28618,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.key = reader.bytes(); - break; + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.key = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -26992,7 +28705,7 @@ if (object.key != null) if (typeof object.key === "string") $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) + else if (object.key.length >= 0) message.key = object.key; return message; }; @@ -27038,6 +28751,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PublicKey + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.PublicKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublicKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.PublicKey"; + }; + /** * KeyType enum. * @name google.cloud.security.privateca.v1beta1.PublicKey.KeyType @@ -27171,15 +28899,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subjectConfig = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.decode(reader, reader.uint32()); - break; - case 2: - message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32()); - break; - case 3: - message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.decode(reader, reader.uint32()); - break; + case 1: { + message.subjectConfig = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.reusableConfig = $root.google.cloud.security.privateca.v1beta1.ReusableConfigWrapper.decode(reader, reader.uint32()); + break; + } + case 3: { + message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27301,6 +29032,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateConfig"; + }; + CertificateConfig.SubjectConfig = (function() { /** @@ -27415,15 +29161,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32()); - break; - case 2: - message.commonName = reader.string(); - break; - case 3: - message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.decode(reader, reader.uint32()); - break; + case 1: { + message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32()); + break; + } + case 2: { + message.commonName = reader.string(); + break; + } + case 3: { + message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27540,6 +29289,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubjectConfig + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubjectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateConfig.SubjectConfig"; + }; + return SubjectConfig; })(); @@ -27719,34 +29483,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subjectDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.decode(reader, reader.uint32()); - break; - case 2: - message.configValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); - break; - case 3: - message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.decode(reader, reader.uint32()); - break; - case 4: - message.subjectKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.decode(reader, reader.uint32()); - break; - case 5: - message.authorityKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.decode(reader, reader.uint32()); - break; - case 6: - if (!(message.crlDistributionPoints && message.crlDistributionPoints.length)) - message.crlDistributionPoints = []; - message.crlDistributionPoints.push(reader.string()); - break; - case 7: - if (!(message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length)) - message.aiaIssuingCertificateUrls = []; - message.aiaIssuingCertificateUrls.push(reader.string()); - break; - case 8: - message.certFingerprint = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.decode(reader, reader.uint32()); - break; + case 1: { + message.subjectDescription = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription.decode(reader, reader.uint32()); + break; + } + case 2: { + message.configValues = $root.google.cloud.security.privateca.v1beta1.ReusableConfigValues.decode(reader, reader.uint32()); + break; + } + case 3: { + message.publicKey = $root.google.cloud.security.privateca.v1beta1.PublicKey.decode(reader, reader.uint32()); + break; + } + case 4: { + message.subjectKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + } + case 5: { + message.authorityKeyId = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId.decode(reader, reader.uint32()); + break; + } + case 6: { + if (!(message.crlDistributionPoints && message.crlDistributionPoints.length)) + message.crlDistributionPoints = []; + message.crlDistributionPoints.push(reader.string()); + break; + } + case 7: { + if (!(message.aiaIssuingCertificateUrls && message.aiaIssuingCertificateUrls.length)) + message.aiaIssuingCertificateUrls = []; + message.aiaIssuingCertificateUrls.push(reader.string()); + break; + } + case 8: { + message.certFingerprint = $root.google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -27949,6 +29721,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateDescription + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateDescription"; + }; + CertificateDescription.SubjectDescription = (function() { /** @@ -28107,27 +29894,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32()); - break; - case 2: - message.commonName = reader.string(); - break; - case 3: - message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.decode(reader, reader.uint32()); - break; - case 4: - message.hexSerialNumber = reader.string(); - break; - case 5: - message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; + case 1: { + message.subject = $root.google.cloud.security.privateca.v1beta1.Subject.decode(reader, reader.uint32()); + break; + } + case 2: { + message.commonName = reader.string(); + break; + } + case 3: { + message.subjectAltName = $root.google.cloud.security.privateca.v1beta1.SubjectAltNames.decode(reader, reader.uint32()); + break; + } + case 4: { + message.hexSerialNumber = reader.string(); + break; + } + case 5: { + message.lifetime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.notBeforeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.notAfterTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -28291,6 +30085,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubjectDescription + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubjectDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateDescription.SubjectDescription"; + }; + return SubjectDescription; })(); @@ -28386,9 +30195,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.keyId = reader.string(); - break; + case 1: { + message.keyId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28478,6 +30288,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyId + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateDescription.KeyId"; + }; + return KeyId; })(); @@ -28573,9 +30398,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.sha256Hash = reader.string(); - break; + case 1: { + message.sha256Hash = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28665,6 +30491,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CertificateFingerprint + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CertificateFingerprint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CertificateDescription.CertificateFingerprint"; + }; + return CertificateFingerprint; })(); @@ -28768,16 +30609,17 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.objectIdPath && message.objectIdPath.length)) - message.objectIdPath = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) + case 1: { + if (!(message.objectIdPath && message.objectIdPath.length)) + message.objectIdPath = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.objectIdPath.push(reader.int32()); + } else message.objectIdPath.push(reader.int32()); - } else - message.objectIdPath.push(reader.int32()); - break; + break; + } default: reader.skipType(tag & 7); break; @@ -28879,6 +30721,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ObjectId + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ObjectId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ObjectId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ObjectId"; + }; + return ObjectId; })(); @@ -28996,15 +30853,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.objectId = $root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32()); - break; - case 2: - message.critical = reader.bool(); - break; - case 3: - message.value = reader.bytes(); - break; + case 1: { + message.objectId = $root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32()); + break; + } + case 2: { + message.critical = reader.bool(); + break; + } + case 3: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -29076,7 +30936,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; }; @@ -29125,6 +30985,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for X509Extension + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.X509Extension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + X509Extension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.X509Extension"; + }; + return X509Extension; })(); @@ -29244,17 +31119,20 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.baseKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.decode(reader, reader.uint32()); - break; - case 2: - message.extendedKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length)) - message.unknownExtendedKeyUsages = []; - message.unknownExtendedKeyUsages.push($root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32())); - break; + case 1: { + message.baseKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions.decode(reader, reader.uint32()); + break; + } + case 2: { + message.extendedKeyUsage = $root.google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.unknownExtendedKeyUsages && message.unknownExtendedKeyUsages.length)) + message.unknownExtendedKeyUsages = []; + message.unknownExtendedKeyUsages.push($root.google.cloud.security.privateca.v1beta1.ObjectId.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -29389,6 +31267,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyUsage + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyUsage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.KeyUsage"; + }; + KeyUsage.KeyUsageOptions = (function() { /** @@ -29569,33 +31462,42 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.digitalSignature = reader.bool(); - break; - case 2: - message.contentCommitment = reader.bool(); - break; - case 3: - message.keyEncipherment = reader.bool(); - break; - case 4: - message.dataEncipherment = reader.bool(); - break; - case 5: - message.keyAgreement = reader.bool(); - break; - case 6: - message.certSign = reader.bool(); - break; - case 7: - message.crlSign = reader.bool(); - break; - case 8: - message.encipherOnly = reader.bool(); - break; - case 9: - message.decipherOnly = reader.bool(); - break; + case 1: { + message.digitalSignature = reader.bool(); + break; + } + case 2: { + message.contentCommitment = reader.bool(); + break; + } + case 3: { + message.keyEncipherment = reader.bool(); + break; + } + case 4: { + message.dataEncipherment = reader.bool(); + break; + } + case 5: { + message.keyAgreement = reader.bool(); + break; + } + case 6: { + message.certSign = reader.bool(); + break; + } + case 7: { + message.crlSign = reader.bool(); + break; + } + case 8: { + message.encipherOnly = reader.bool(); + break; + } + case 9: { + message.decipherOnly = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -29750,6 +31652,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for KeyUsageOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyUsageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.KeyUsage.KeyUsageOptions"; + }; + return KeyUsageOptions; })(); @@ -29900,24 +31817,30 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.serverAuth = reader.bool(); - break; - case 2: - message.clientAuth = reader.bool(); - break; - case 3: - message.codeSigning = reader.bool(); - break; - case 4: - message.emailProtection = reader.bool(); - break; - case 5: - message.timeStamping = reader.bool(); - break; - case 6: - message.ocspSigning = reader.bool(); - break; + case 1: { + message.serverAuth = reader.bool(); + break; + } + case 2: { + message.clientAuth = reader.bool(); + break; + } + case 3: { + message.codeSigning = reader.bool(); + break; + } + case 4: { + message.emailProtection = reader.bool(); + break; + } + case 5: { + message.timeStamping = reader.bool(); + break; + } + case 6: { + message.ocspSigning = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -30048,6 +31971,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExtendedKeyUsageOptions + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtendedKeyUsageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.KeyUsage.ExtendedKeyUsageOptions"; + }; + return ExtendedKeyUsageOptions; })(); @@ -30212,27 +32150,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.countryCode = reader.string(); - break; - case 2: - message.organization = reader.string(); - break; - case 3: - message.organizationalUnit = reader.string(); - break; - case 4: - message.locality = reader.string(); - break; - case 5: - message.province = reader.string(); - break; - case 6: - message.streetAddress = reader.string(); - break; - case 7: - message.postalCode = reader.string(); - break; + case 1: { + message.countryCode = reader.string(); + break; + } + case 2: { + message.organization = reader.string(); + break; + } + case 3: { + message.organizationalUnit = reader.string(); + break; + } + case 4: { + message.locality = reader.string(); + break; + } + case 5: { + message.province = reader.string(); + break; + } + case 6: { + message.streetAddress = reader.string(); + break; + } + case 7: { + message.postalCode = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -30371,6 +32316,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Subject + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.Subject + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Subject.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.Subject"; + }; + return Subject; })(); @@ -30520,31 +32480,36 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.dnsNames && message.dnsNames.length)) - message.dnsNames = []; - message.dnsNames.push(reader.string()); - break; - case 2: - if (!(message.uris && message.uris.length)) - message.uris = []; - message.uris.push(reader.string()); - break; - case 3: - if (!(message.emailAddresses && message.emailAddresses.length)) - message.emailAddresses = []; - message.emailAddresses.push(reader.string()); - break; - case 4: - if (!(message.ipAddresses && message.ipAddresses.length)) - message.ipAddresses = []; - message.ipAddresses.push(reader.string()); - break; - case 5: - if (!(message.customSans && message.customSans.length)) - message.customSans = []; - message.customSans.push($root.google.cloud.security.privateca.v1beta1.X509Extension.decode(reader, reader.uint32())); - break; + case 1: { + if (!(message.dnsNames && message.dnsNames.length)) + message.dnsNames = []; + message.dnsNames.push(reader.string()); + break; + } + case 2: { + if (!(message.uris && message.uris.length)) + message.uris = []; + message.uris.push(reader.string()); + break; + } + case 3: { + if (!(message.emailAddresses && message.emailAddresses.length)) + message.emailAddresses = []; + message.emailAddresses.push(reader.string()); + break; + } + case 4: { + if (!(message.ipAddresses && message.ipAddresses.length)) + message.ipAddresses = []; + message.ipAddresses.push(reader.string()); + break; + } + case 5: { + if (!(message.customSans && message.customSans.length)) + message.customSans = []; + message.customSans.push($root.google.cloud.security.privateca.v1beta1.X509Extension.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -30732,6 +32697,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for SubjectAltNames + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.SubjectAltNames + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SubjectAltNames.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.SubjectAltNames"; + }; + return SubjectAltNames; })(); @@ -30796,7 +32776,7 @@ }; /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|createCertificate}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef CreateCertificateCallback * @type {function} @@ -30829,7 +32809,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getCertificate}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef GetCertificateCallback * @type {function} @@ -30862,7 +32842,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificates}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listCertificates}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef ListCertificatesCallback * @type {function} @@ -30895,7 +32875,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#revokeCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|revokeCertificate}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef RevokeCertificateCallback * @type {function} @@ -30928,7 +32908,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificate}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|updateCertificate}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef UpdateCertificateCallback * @type {function} @@ -30961,7 +32941,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#activateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|activateCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef ActivateCertificateAuthorityCallback * @type {function} @@ -30994,7 +32974,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#createCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|createCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef CreateCertificateAuthorityCallback * @type {function} @@ -31027,7 +33007,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#disableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|disableCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef DisableCertificateAuthorityCallback * @type {function} @@ -31060,7 +33040,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#enableCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|enableCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef EnableCertificateAuthorityCallback * @type {function} @@ -31093,7 +33073,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#fetchCertificateAuthorityCsr}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|fetchCertificateAuthorityCsr}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef FetchCertificateAuthorityCsrCallback * @type {function} @@ -31126,7 +33106,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef GetCertificateAuthorityCallback * @type {function} @@ -31159,7 +33139,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateAuthorities}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listCertificateAuthorities}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef ListCertificateAuthoritiesCallback * @type {function} @@ -31192,7 +33172,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#restoreCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|restoreCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef RestoreCertificateAuthorityCallback * @type {function} @@ -31225,7 +33205,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#scheduleDeleteCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|scheduleDeleteCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef ScheduleDeleteCertificateAuthorityCallback * @type {function} @@ -31258,7 +33238,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateAuthority}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|updateCertificateAuthority}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef UpdateCertificateAuthorityCallback * @type {function} @@ -31291,7 +33271,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getCertificateRevocationList}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef GetCertificateRevocationListCallback * @type {function} @@ -31324,7 +33304,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listCertificateRevocationLists}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listCertificateRevocationLists}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef ListCertificateRevocationListsCallback * @type {function} @@ -31357,7 +33337,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#updateCertificateRevocationList}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|updateCertificateRevocationList}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef UpdateCertificateRevocationListCallback * @type {function} @@ -31390,7 +33370,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#getReusableConfig}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|getReusableConfig}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef GetReusableConfigCallback * @type {function} @@ -31423,7 +33403,7 @@ */ /** - * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService#listReusableConfigs}. + * Callback as used by {@link google.cloud.security.privateca.v1beta1.CertificateAuthorityService|listReusableConfigs}. * @memberof google.cloud.security.privateca.v1beta1.CertificateAuthorityService * @typedef ListReusableConfigsCallback * @type {function} @@ -31583,18 +33563,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.certificateId = reader.string(); - break; - case 3: - message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.certificateId = reader.string(); + break; + } + case 3: { + message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -31714,6 +33698,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CreateCertificateRequest"; + }; + return CreateCertificateRequest; })(); @@ -31809,9 +33808,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; @@ -31901,6 +33901,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.GetCertificateRequest"; + }; + return GetCertificateRequest; })(); @@ -32040,21 +34055,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; @@ -32177,6 +34197,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificatesRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListCertificatesRequest"; + }; + return ListCertificatesRequest; })(); @@ -32298,19 +34333,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificates && message.certificates.length)) - message.certificates = []; - message.certificates.push($root.google.cloud.security.privateca.v1beta1.Certificate.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.certificates && message.certificates.length)) + message.certificates = []; + message.certificates.push($root.google.cloud.security.privateca.v1beta1.Certificate.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; @@ -32447,6 +34485,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificatesResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListCertificatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListCertificatesResponse"; + }; + return ListCertificatesResponse; })(); @@ -32564,15 +34617,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.reason = reader.int32(); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.reason = reader.int32(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32727,6 +34783,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RevokeCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.RevokeCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RevokeCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.RevokeCertificateRequest"; + }; + return RevokeCertificateRequest; })(); @@ -32844,15 +34915,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificate = $root.google.cloud.security.privateca.v1beta1.Certificate.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -32969,6 +35043,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.UpdateCertificateRequest"; + }; + return UpdateCertificateRequest; })(); @@ -33097,18 +35186,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.pemCaCertificate = reader.string(); - break; - case 3: - message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.pemCaCertificate = reader.string(); + break; + } + case 3: { + message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33228,6 +35321,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ActivateCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest"; + }; + return ActivateCertificateAuthorityRequest; })(); @@ -33356,18 +35464,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.parent = reader.string(); - break; - case 2: - message.certificateAuthorityId = reader.string(); - break; - case 3: - message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.decode(reader, reader.uint32()); - break; - case 4: - message.requestId = reader.string(); - break; + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.certificateAuthorityId = reader.string(); + break; + } + case 3: { + message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33487,6 +35599,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest"; + }; + return CreateCertificateAuthorityRequest; })(); @@ -33593,12 +35720,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33697,6 +35826,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DisableCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisableCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest"; + }; + return DisableCertificateAuthorityRequest; })(); @@ -33803,12 +35947,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -33907,6 +36053,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for EnableCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnableCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest"; + }; + return EnableCertificateAuthorityRequest; })(); @@ -34002,9 +36163,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; @@ -34094,6 +36256,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchCertificateAuthorityCsrRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchCertificateAuthorityCsrRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest"; + }; + return FetchCertificateAuthorityCsrRequest; })(); @@ -34189,9 +36366,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.pemCsr = reader.string(); - break; + case 1: { + message.pemCsr = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -34281,6 +36459,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FetchCertificateAuthorityCsrResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchCertificateAuthorityCsrResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse"; + }; + return FetchCertificateAuthorityCsrResponse; })(); @@ -34376,9 +36569,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; @@ -34468,6 +36662,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest"; + }; + return GetCertificateAuthorityRequest; })(); @@ -34607,21 +36816,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; @@ -34744,6 +36958,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateAuthoritiesRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateAuthoritiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest"; + }; + return ListCertificateAuthoritiesRequest; })(); @@ -34865,19 +37094,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificateAuthorities && message.certificateAuthorities.length)) - message.certificateAuthorities = []; - message.certificateAuthorities.push($root.google.cloud.security.privateca.v1beta1.CertificateAuthority.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.certificateAuthorities && message.certificateAuthorities.length)) + message.certificateAuthorities = []; + message.certificateAuthorities.push($root.google.cloud.security.privateca.v1beta1.CertificateAuthority.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; @@ -35014,6 +37246,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateAuthoritiesResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateAuthoritiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesResponse"; + }; + return ListCertificateAuthoritiesResponse; })(); @@ -35120,12 +37367,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35224,6 +37473,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RestoreCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestoreCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest"; + }; + return RestoreCertificateAuthorityRequest; })(); @@ -35330,12 +37594,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.requestId = reader.string(); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35434,6 +37700,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ScheduleDeleteCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScheduleDeleteCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest"; + }; + return ScheduleDeleteCertificateAuthorityRequest; })(); @@ -35551,15 +37832,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificateAuthority = $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -35676,6 +37960,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateAuthorityRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateAuthorityRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest"; + }; + return UpdateCertificateAuthorityRequest; })(); @@ -35771,9 +38070,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; @@ -35863,6 +38163,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetCertificateRevocationListRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCertificateRevocationListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest"; + }; + return GetCertificateRevocationListRequest; })(); @@ -36002,21 +38317,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; @@ -36139,6 +38459,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateRevocationListsRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateRevocationListsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest"; + }; + return ListCertificateRevocationListsRequest; })(); @@ -36260,19 +38595,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.certificateRevocationLists && message.certificateRevocationLists.length)) - message.certificateRevocationLists = []; - message.certificateRevocationLists.push($root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.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.certificateRevocationLists && message.certificateRevocationLists.length)) + message.certificateRevocationLists = []; + message.certificateRevocationLists.push($root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.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; @@ -36409,6 +38747,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCertificateRevocationListsResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCertificateRevocationListsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsResponse"; + }; + return ListCertificateRevocationListsResponse; })(); @@ -36526,15 +38879,18 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - case 3: - message.requestId = reader.string(); - break; + case 1: { + message.certificateRevocationList = $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -36651,6 +39007,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateCertificateRevocationListRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCertificateRevocationListRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest"; + }; + return UpdateCertificateRevocationListRequest; })(); @@ -36746,9 +39117,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; @@ -36838,6 +39210,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetReusableConfigRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.GetReusableConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetReusableConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.GetReusableConfigRequest"; + }; + return GetReusableConfigRequest; })(); @@ -36977,21 +39364,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; @@ -37114,6 +39506,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListReusableConfigsRequest + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReusableConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest"; + }; + return ListReusableConfigsRequest; })(); @@ -37235,19 +39642,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.reusableConfigs && message.reusableConfigs.length)) - message.reusableConfigs = []; - message.reusableConfigs.push($root.google.cloud.security.privateca.v1beta1.ReusableConfig.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.reusableConfigs && message.reusableConfigs.length)) + message.reusableConfigs = []; + message.reusableConfigs.push($root.google.cloud.security.privateca.v1beta1.ReusableConfig.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; @@ -37384,6 +39794,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListReusableConfigsResponse + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListReusableConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.ListReusableConfigsResponse"; + }; + return ListReusableConfigsResponse; })(); @@ -37545,27 +39970,34 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 3: - message.target = reader.string(); - break; - case 4: - message.verb = reader.string(); - break; - case 5: - message.statusMessage = reader.string(); - break; - case 6: - message.requestedCancellation = reader.bool(); - break; - case 7: - message.apiVersion = reader.string(); - break; + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusMessage = reader.string(); + break; + } + case 6: { + message.requestedCancellation = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -37714,6 +40146,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.security.privateca.v1beta1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.security.privateca.v1beta1.OperationMetadata"; + }; + return OperationMetadata; })(); @@ -37929,36 +40376,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; @@ -38156,6 +40610,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 @@ -38292,12 +40761,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; @@ -38396,6 +40867,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; })(); @@ -38504,14 +40990,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; @@ -38627,6 +41115,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; })(); @@ -38837,38 +41340,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; @@ -39090,6 +41603,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; })(); @@ -39196,12 +41724,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; @@ -39300,6 +41830,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; })(); @@ -39409,11 +41954,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; @@ -39520,6 +42066,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; })(); @@ -39541,6 +42102,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 */ /** @@ -39661,6 +42223,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 @@ -39716,6 +42286,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; }; @@ -39750,66 +42322,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; @@ -39921,6 +42509,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; }; @@ -40013,6 +42604,8 @@ } if (object.syntax != null) message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; @@ -40044,6 +42637,7 @@ object.options = null; object.sourceCodeInfo = null; object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -40090,6 +42684,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; }; @@ -40104,6 +42700,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; })(); @@ -40314,52 +42925,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; @@ -40660,6 +43281,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() { /** @@ -40774,15 +43410,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; @@ -40894,6 +43533,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; })(); @@ -41000,12 +43654,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; @@ -41104,6 +43760,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; })(); @@ -41204,11 +43875,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; @@ -41315,6 +43987,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; })(); @@ -41520,39 +44207,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; @@ -41839,6 +44537,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 @@ -42007,12 +44720,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; @@ -42116,6 +44831,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; })(); @@ -42261,27 +44991,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; @@ -42457,6 +45192,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() { /** @@ -42560,12 +45310,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; @@ -42664,6 +45416,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; })(); @@ -42784,15 +45551,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; @@ -42904,6 +45674,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; })(); @@ -43023,17 +45808,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; @@ -43163,6 +45951,21 @@ 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; })(); @@ -43313,24 +46116,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; @@ -43466,6 +46275,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; })(); @@ -43796,76 +46620,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; @@ -44178,6 +47024,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 @@ -44346,26 +47207,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; @@ -44519,6 +47386,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; })(); @@ -44532,6 +47414,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 @@ -44588,6 +47471,14 @@ */ FieldOptions.prototype.lazy = false; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + /** * FieldOptions deprecated. * @member {boolean} deprecated @@ -44664,6 +47555,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(); @@ -44709,42 +47602,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; @@ -44804,6 +47710,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"; @@ -44889,6 +47798,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) @@ -44976,6 +47887,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")) @@ -44990,6 +47902,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) @@ -45016,6 +47930,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 @@ -45145,11 +48074,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; @@ -45256,6 +48186,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; })(); @@ -45375,17 +48320,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; @@ -45510,6 +48458,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; })(); @@ -45618,14 +48581,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; @@ -45741,6 +48706,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; })(); @@ -45871,20 +48851,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; @@ -46017,6 +49001,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; })(); @@ -46171,28 +49170,34 @@ 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 1049: - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); - 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; + } + case 1049: { + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -46382,6 +49387,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 @@ -46561,29 +49581,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; @@ -46696,7 +49723,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); @@ -46777,6 +49804,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() { /** @@ -46878,12 +49920,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; @@ -46984,6 +50028,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; })(); @@ -47084,11 +50143,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; @@ -47195,6 +50255,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() { /** @@ -47343,37 +50418,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; @@ -47534,6 +50614,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; })(); @@ -47634,11 +50729,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; @@ -47745,6 +50841,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() { /** @@ -47755,6 +50866,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 */ /** @@ -47805,6 +50917,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 @@ -47841,6 +50961,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; }; @@ -47875,25 +50997,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; @@ -47945,6 +51075,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; }; @@ -47973,6 +51112,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; }; @@ -47995,6 +51148,7 @@ object.sourceFile = ""; object.begin = 0; object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; } if (message.path && message.path.length) { object.path = []; @@ -48007,6 +51161,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; }; @@ -48021,6 +51177,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; })(); @@ -48130,12 +51317,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; @@ -48248,6 +51437,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; })(); @@ -48354,12 +51558,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; @@ -48472,6 +51678,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; })(); @@ -48578,12 +51799,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; @@ -48645,7 +51868,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; }; @@ -48691,6 +51914,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; })(); @@ -48851,6 +52089,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; })(); @@ -48948,11 +52201,12 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -49054,6 +52308,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -49149,9 +52418,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.double(); - break; + case 1: { + message.value = reader.double(); + break; + } default: reader.skipType(tag & 7); break; @@ -49241,6 +52511,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + return DoubleValue; })(); @@ -49336,9 +52621,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.float(); - break; + case 1: { + message.value = reader.float(); + break; + } default: reader.skipType(tag & 7); break; @@ -49428,6 +52714,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + return FloatValue; })(); @@ -49523,9 +52824,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int64(); - break; + case 1: { + message.value = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -49629,6 +52931,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + return Int64Value; })(); @@ -49724,9 +53041,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.uint64(); - break; + case 1: { + message.value = reader.uint64(); + break; + } default: reader.skipType(tag & 7); break; @@ -49830,6 +53148,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + return UInt64Value; })(); @@ -49925,9 +53258,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.int32(); - break; + case 1: { + message.value = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -50017,6 +53351,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + return Int32Value; })(); @@ -50112,9 +53461,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.uint32(); - break; + case 1: { + message.value = reader.uint32(); + break; + } default: reader.skipType(tag & 7); break; @@ -50204,6 +53554,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + return UInt32Value; })(); @@ -50299,9 +53664,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.bool(); - break; + case 1: { + message.value = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -50391,6 +53757,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + return BoolValue; })(); @@ -50486,9 +53867,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.string(); - break; + case 1: { + message.value = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -50578,6 +53960,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + return StringValue; })(); @@ -50673,9 +54070,10 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.value = reader.bytes(); - break; + case 1: { + message.value = reader.bytes(); + break; + } default: reader.skipType(tag & 7); break; @@ -50732,7 +54130,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; }; @@ -50774,6 +54172,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + return BytesValue; })(); @@ -50914,18 +54327,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.expression = reader.string(); - break; - case 2: - message.title = reader.string(); - break; - case 3: - message.description = reader.string(); - break; - case 4: - message.location = reader.string(); - break; + case 1: { + message.expression = reader.string(); + break; + } + case 2: { + message.title = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.location = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -51040,6 +54457,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Expr + * @function getTypeUrl + * @memberof google.type.Expr + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expr.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Expr"; + }; + return Expr; })(); @@ -51088,7 +54520,7 @@ }; /** - * Callback as used by {@link google.longrunning.Operations#listOperations}. + * Callback as used by {@link google.longrunning.Operations|listOperations}. * @memberof google.longrunning.Operations * @typedef ListOperationsCallback * @type {function} @@ -51121,7 +54553,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#getOperation}. + * Callback as used by {@link google.longrunning.Operations|getOperation}. * @memberof google.longrunning.Operations * @typedef GetOperationCallback * @type {function} @@ -51154,7 +54586,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#deleteOperation}. + * Callback as used by {@link google.longrunning.Operations|deleteOperation}. * @memberof google.longrunning.Operations * @typedef DeleteOperationCallback * @type {function} @@ -51187,7 +54619,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#cancelOperation}. + * Callback as used by {@link google.longrunning.Operations|cancelOperation}. * @memberof google.longrunning.Operations * @typedef CancelOperationCallback * @type {function} @@ -51220,7 +54652,7 @@ */ /** - * Callback as used by {@link google.longrunning.Operations#waitOperation}. + * Callback as used by {@link google.longrunning.Operations|waitOperation}. * @memberof google.longrunning.Operations * @typedef WaitOperationCallback * @type {function} @@ -51405,21 +54837,26 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.done = reader.bool(); - break; - case 4: - message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); - break; - case 5: - message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 3: { + message.done = reader.bool(); + break; + } + case 4: { + message.error = $root.google.rpc.Status.decode(reader, reader.uint32()); + break; + } + case 5: { + message.response = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -51570,6 +55007,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -51665,9 +55117,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; @@ -51757,6 +55210,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -51885,18 +55353,22 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: - message.name = reader.string(); - break; - case 1: - message.filter = reader.string(); - break; - case 2: - message.pageSize = reader.int32(); - break; - case 3: - message.pageToken = reader.string(); - break; + case 4: { + message.name = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -52011,6 +55483,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -52119,14 +55606,16 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - if (!(message.operations && message.operations.length)) - message.operations = []; - message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; + case 1: { + if (!(message.operations && message.operations.length)) + message.operations = []; + message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -52242,6 +55731,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -52337,9 +55841,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; @@ -52429,6 +55934,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -52524,9 +56044,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; @@ -52616,6 +56137,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -52722,12 +56258,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -52831,6 +56369,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -52937,12 +56490,14 @@ while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.responseType = reader.string(); - break; - case 2: - message.metadataType = reader.string(); - break; + case 1: { + message.responseType = reader.string(); + break; + } + case 2: { + message.metadataType = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -53041,6 +56596,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); @@ -53172,17 +56742,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; @@ -53307,6 +56880,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-security-privateca/protos/protos.json b/packages/google-cloud-security-privateca/protos/protos.json index 1905272caaa..c5aa6856a70 100644 --- a/packages/google-cloud-security-privateca/protos/protos.json +++ b/packages/google-cloud-security-privateca/protos/protos.json @@ -5401,6 +5401,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -5929,6 +5933,13 @@ "default": false } }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, "deprecated": { "type": "bool", "id": 3, @@ -6221,6 +6232,19 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } From 88b2e0c129d36c516180425696a61e188b76f878 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 04:58:20 +0000 Subject: [PATCH 103/113] fix: do not import the whole google-gax from proto JS (#1553) (#199) 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-security-privateca/package.json | 2 +- packages/google-cloud-security-privateca/protos/protos.d.ts | 2 +- packages/google-cloud-security-privateca/protos/protos.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 115a3f0aca3..66d01cb3a9b 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^3.0.1" + "google-gax": "^3.3.0" }, "devDependencies": { "@types/mocha": "^9.0.0", diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index de4b0bf9c27..d7f3f27032e 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index dcea34ac820..77df8331063 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/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 19359f6acef17dcc87e21d2ee7ebdd6745d3a9b7 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 1 Sep 2022 20:50:23 +0000 Subject: [PATCH 104/113] fix: allow passing gax instance to client constructor (#200) - [ ] Regenerate this pull request now. 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 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 --- .../certificate_authority_service_client.ts | 238 ++++++++++-------- .../certificate_authority_service_client.ts | 157 +++++++----- 2 files changed, 223 insertions(+), 172 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 3b96b12b70c..48efce9e16c 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_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, @@ -32,7 +32,6 @@ import { LocationsClient, LocationProtos, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -42,7 +41,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 './certificate_authority_service_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -106,8 +104,18 @@ export class CertificateAuthorityServiceClient { * 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 CertificateAuthorityServiceClient({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 CertificateAuthorityServiceClient; @@ -128,8 +136,13 @@ export class CertificateAuthorityServiceClient { 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); @@ -150,9 +163,12 @@ export class CertificateAuthorityServiceClient { if (servicePath === staticMembers.servicePath) { this.auth.defaultScopes = staticMembers.scopes; } - this.iamClient = new IamClient(this._gaxGrpc, opts); + this.iamClient = new this._gaxModule.IamClient(this._gaxGrpc, opts); - this.locationsClient = new LocationsClient(this._gaxGrpc, opts); + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts + ); // Determine the client header string. const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; @@ -527,7 +543,7 @@ export class CertificateAuthorityServiceClient { 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; } /** @@ -809,7 +825,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -906,7 +922,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1021,7 +1037,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1135,7 +1151,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate.name': request.certificate!.name || '', }); this.initialize(); @@ -1239,7 +1255,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1341,7 +1357,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1436,7 +1452,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1550,7 +1566,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ ca_pool: request.caPool || '', }); this.initialize(); @@ -1648,7 +1664,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1750,7 +1766,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1884,7 +1900,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1914,11 +1930,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.activateCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2046,7 +2063,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2076,11 +2093,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2202,7 +2220,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2232,11 +2250,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.disableCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2358,7 +2377,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2388,11 +2407,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.enableCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2514,7 +2534,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2544,11 +2564,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.undeleteCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2677,7 +2698,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2707,11 +2728,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2834,7 +2856,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate_authority.name': request.certificateAuthority!.name || '', }); this.initialize(); @@ -2864,11 +2886,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2995,7 +3018,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3021,11 +3044,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createCaPool, this._gaxModule.createDefaultBackoffSettings() @@ -3148,7 +3172,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'ca_pool.name': request.caPool!.name || '', }); this.initialize(); @@ -3174,11 +3198,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateCaPool, this._gaxModule.createDefaultBackoffSettings() @@ -3300,7 +3325,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3326,11 +3351,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteCaPool, this._gaxModule.createDefaultBackoffSettings() @@ -3453,7 +3479,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate_revocation_list.name': request.certificateRevocationList!.name || '', }); @@ -3484,11 +3510,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateCertificateRevocationList, this._gaxModule.createDefaultBackoffSettings() @@ -3616,7 +3643,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3646,11 +3673,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createCertificateTemplate, this._gaxModule.createDefaultBackoffSettings() @@ -3772,7 +3800,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3802,11 +3830,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.deleteCertificateTemplate, this._gaxModule.createDefaultBackoffSettings() @@ -3929,7 +3958,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate_template.name': request.certificateTemplate!.name || '', }); this.initialize(); @@ -3959,11 +3988,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateCertificateTemplate, this._gaxModule.createDefaultBackoffSettings() @@ -4081,7 +4111,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -4135,7 +4165,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; @@ -4198,7 +4228,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; @@ -4314,7 +4344,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -4368,7 +4398,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; @@ -4427,7 +4457,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; @@ -4543,7 +4573,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -4593,7 +4623,7 @@ export class CertificateAuthorityServiceClient { 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['listCaPools']; @@ -4652,7 +4682,7 @@ export class CertificateAuthorityServiceClient { 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['listCaPools']; @@ -4768,7 +4798,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -4822,7 +4852,7 @@ export class CertificateAuthorityServiceClient { 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 = @@ -4882,7 +4912,7 @@ export class CertificateAuthorityServiceClient { 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 = @@ -4999,7 +5029,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -5053,7 +5083,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateTemplates']; @@ -5112,7 +5142,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateTemplates']; diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index ee4ce7d6a5d..a29fd0ec073 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_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, @@ -28,7 +28,6 @@ import { PaginationCallback, GaxCall, } from 'google-gax'; - import {Transform} from 'stream'; import * as protos from '../../protos/protos'; import jsonProtos = require('../../protos/protos.json'); @@ -38,7 +37,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 './certificate_authority_service_client_config.json'; -import {operationsProtos} from 'google-gax'; const version = require('../../../package.json').version; /** @@ -100,8 +98,18 @@ export class CertificateAuthorityServiceClient { * 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) { + * @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 CertificateAuthorityServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { // Ensure that options include all the required fields. const staticMembers = this .constructor as typeof CertificateAuthorityServiceClient; @@ -122,8 +130,13 @@ export class CertificateAuthorityServiceClient { 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); @@ -383,7 +396,7 @@ export class CertificateAuthorityServiceClient { 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; } /** @@ -641,7 +654,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -738,7 +751,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -852,7 +865,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -966,7 +979,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate.name': request.certificate!.name || '', }); this.initialize(); @@ -1070,7 +1083,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1172,7 +1185,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1274,7 +1287,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1375,7 +1388,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1505,7 +1518,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1535,11 +1548,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.activateCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -1667,7 +1681,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1697,11 +1711,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.createCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -1823,7 +1838,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -1853,11 +1868,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.disableCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -1979,7 +1995,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2009,11 +2025,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.enableCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2135,7 +2152,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2165,11 +2182,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.restoreCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2291,7 +2309,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2321,11 +2339,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.scheduleDeleteCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2448,7 +2467,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate_authority.name': request.certificateAuthority!.name || '', }); this.initialize(); @@ -2478,11 +2497,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateCertificateAuthority, this._gaxModule.createDefaultBackoffSettings() @@ -2605,7 +2625,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = - gax.routingHeader.fromParams({ + this._gaxModule.routingHeader.fromParams({ 'certificate_revocation_list.name': request.certificateRevocationList!.name || '', }); @@ -2636,11 +2656,12 @@ export class CertificateAuthorityServiceClient { protos.google.cloud.security.privateca.v1beta1.OperationMetadata > > { - const request = new operationsProtos.google.longrunning.GetOperationRequest( - {name} - ); + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new gax.Operation( + const decodeOperation = new this._gaxModule.Operation( operation, this.descriptors.longrunning.updateCertificateRevocationList, this._gaxModule.createDefaultBackoffSettings() @@ -2758,7 +2779,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -2812,7 +2833,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; @@ -2875,7 +2896,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; @@ -2991,7 +3012,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3045,7 +3066,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; @@ -3104,7 +3125,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; @@ -3220,7 +3241,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3274,7 +3295,7 @@ export class CertificateAuthorityServiceClient { 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 = @@ -3334,7 +3355,7 @@ export class CertificateAuthorityServiceClient { 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 = @@ -3451,7 +3472,7 @@ export class CertificateAuthorityServiceClient { 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(); @@ -3501,7 +3522,7 @@ export class CertificateAuthorityServiceClient { 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['listReusableConfigs']; @@ -3560,7 +3581,7 @@ export class CertificateAuthorityServiceClient { 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['listReusableConfigs']; From b0032dea5244b55db893ca2358ed189058dd6648 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:34:11 +0000 Subject: [PATCH 105/113] fix: preserve default values in x-goog-request-params header (#201) - [ ] 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 --- .../certificate_authority_service_client.ts | 78 +- .../certificate_authority_service_client.ts | 56 +- .../gapic_certificate_authority_service_v1.ts | 3269 +++++++++-------- ...c_certificate_authority_service_v1beta1.ts | 2249 ++++++------ 4 files changed, 2950 insertions(+), 2702 deletions(-) diff --git a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts index 48efce9e16c..0a62461f7d7 100644 --- a/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1/certificate_authority_service_client.ts @@ -826,7 +826,7 @@ export class CertificateAuthorityServiceClient { 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.createCertificate(request, options, callback); @@ -923,7 +923,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificate(request, options, callback); @@ -1038,7 +1038,7 @@ export class CertificateAuthorityServiceClient { 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.revokeCertificate(request, options, callback); @@ -1152,7 +1152,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'certificate.name': request.certificate!.name || '', + 'certificate.name': request.certificate!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificate(request, options, callback); @@ -1256,7 +1256,7 @@ export class CertificateAuthorityServiceClient { 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.fetchCertificateAuthorityCsr( @@ -1358,7 +1358,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificateAuthority( @@ -1453,7 +1453,7 @@ export class CertificateAuthorityServiceClient { 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.getCaPool(request, options, callback); @@ -1567,7 +1567,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - ca_pool: request.caPool || '', + ca_pool: request.caPool ?? '', }); this.initialize(); return this.innerApiCalls.fetchCaCerts(request, options, callback); @@ -1665,7 +1665,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificateRevocationList( @@ -1767,7 +1767,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificateTemplate( @@ -1901,7 +1901,7 @@ export class CertificateAuthorityServiceClient { 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.activateCertificateAuthority( @@ -2064,7 +2064,7 @@ export class CertificateAuthorityServiceClient { 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.createCertificateAuthority( @@ -2221,7 +2221,7 @@ export class CertificateAuthorityServiceClient { 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.disableCertificateAuthority( @@ -2378,7 +2378,7 @@ export class CertificateAuthorityServiceClient { 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.enableCertificateAuthority( @@ -2535,7 +2535,7 @@ export class CertificateAuthorityServiceClient { 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.undeleteCertificateAuthority( @@ -2699,7 +2699,7 @@ export class CertificateAuthorityServiceClient { 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.deleteCertificateAuthority( @@ -2857,7 +2857,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'certificate_authority.name': request.certificateAuthority!.name || '', + 'certificate_authority.name': request.certificateAuthority!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificateAuthority( @@ -3019,7 +3019,7 @@ export class CertificateAuthorityServiceClient { 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.createCaPool(request, options, callback); @@ -3173,7 +3173,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'ca_pool.name': request.caPool!.name || '', + 'ca_pool.name': request.caPool!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCaPool(request, options, callback); @@ -3326,7 +3326,7 @@ export class CertificateAuthorityServiceClient { 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.deleteCaPool(request, options, callback); @@ -3481,7 +3481,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ 'certificate_revocation_list.name': - request.certificateRevocationList!.name || '', + request.certificateRevocationList!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificateRevocationList( @@ -3644,7 +3644,7 @@ export class CertificateAuthorityServiceClient { 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.createCertificateTemplate( @@ -3801,7 +3801,7 @@ export class CertificateAuthorityServiceClient { 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.deleteCertificateTemplate( @@ -3959,7 +3959,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'certificate_template.name': request.certificateTemplate!.name || '', + 'certificate_template.name': request.certificateTemplate!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificateTemplate( @@ -4112,7 +4112,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificates(request, options, callback); @@ -4166,7 +4166,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; const callSettings = defaultCallSettings.merge(options); @@ -4229,7 +4229,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; const callSettings = defaultCallSettings.merge(options); @@ -4345,7 +4345,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities( @@ -4399,7 +4399,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); @@ -4458,7 +4458,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); @@ -4574,7 +4574,7 @@ export class CertificateAuthorityServiceClient { 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.listCaPools(request, options, callback); @@ -4624,7 +4624,7 @@ export class CertificateAuthorityServiceClient { 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['listCaPools']; const callSettings = defaultCallSettings.merge(options); @@ -4683,7 +4683,7 @@ export class CertificateAuthorityServiceClient { 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['listCaPools']; const callSettings = defaultCallSettings.merge(options); @@ -4799,7 +4799,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists( @@ -4853,7 +4853,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateRevocationLists']; @@ -4913,7 +4913,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateRevocationLists']; @@ -5030,7 +5030,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificateTemplates( @@ -5084,7 +5084,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateTemplates']; const callSettings = defaultCallSettings.merge(options); @@ -5143,7 +5143,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateTemplates']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts index a29fd0ec073..129a1d1e1ae 100644 --- a/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts +++ b/packages/google-cloud-security-privateca/src/v1beta1/certificate_authority_service_client.ts @@ -655,7 +655,7 @@ export class CertificateAuthorityServiceClient { 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.createCertificate(request, options, callback); @@ -752,7 +752,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificate(request, options, callback); @@ -866,7 +866,7 @@ export class CertificateAuthorityServiceClient { 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.revokeCertificate(request, options, callback); @@ -980,7 +980,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'certificate.name': request.certificate!.name || '', + 'certificate.name': request.certificate!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificate(request, options, callback); @@ -1084,7 +1084,7 @@ export class CertificateAuthorityServiceClient { 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.fetchCertificateAuthorityCsr( @@ -1186,7 +1186,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificateAuthority( @@ -1288,7 +1288,7 @@ export class CertificateAuthorityServiceClient { 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.getCertificateRevocationList( @@ -1389,7 +1389,7 @@ export class CertificateAuthorityServiceClient { 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.getReusableConfig(request, options, callback); @@ -1519,7 +1519,7 @@ export class CertificateAuthorityServiceClient { 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.activateCertificateAuthority( @@ -1682,7 +1682,7 @@ export class CertificateAuthorityServiceClient { 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.createCertificateAuthority( @@ -1839,7 +1839,7 @@ export class CertificateAuthorityServiceClient { 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.disableCertificateAuthority( @@ -1996,7 +1996,7 @@ export class CertificateAuthorityServiceClient { 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.enableCertificateAuthority( @@ -2153,7 +2153,7 @@ export class CertificateAuthorityServiceClient { 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.restoreCertificateAuthority( @@ -2310,7 +2310,7 @@ export class CertificateAuthorityServiceClient { 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.scheduleDeleteCertificateAuthority( @@ -2468,7 +2468,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ - 'certificate_authority.name': request.certificateAuthority!.name || '', + 'certificate_authority.name': request.certificateAuthority!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificateAuthority( @@ -2627,7 +2627,7 @@ export class CertificateAuthorityServiceClient { options.otherArgs.headers['x-goog-request-params'] = this._gaxModule.routingHeader.fromParams({ 'certificate_revocation_list.name': - request.certificateRevocationList!.name || '', + request.certificateRevocationList!.name ?? '', }); this.initialize(); return this.innerApiCalls.updateCertificateRevocationList( @@ -2780,7 +2780,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificates(request, options, callback); @@ -2834,7 +2834,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; const callSettings = defaultCallSettings.merge(options); @@ -2897,7 +2897,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificates']; const callSettings = defaultCallSettings.merge(options); @@ -3013,7 +3013,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificateAuthorities( @@ -3067,7 +3067,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); @@ -3126,7 +3126,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateAuthorities']; const callSettings = defaultCallSettings.merge(options); @@ -3242,7 +3242,7 @@ export class CertificateAuthorityServiceClient { 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.listCertificateRevocationLists( @@ -3296,7 +3296,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateRevocationLists']; @@ -3356,7 +3356,7 @@ export class CertificateAuthorityServiceClient { 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['listCertificateRevocationLists']; @@ -3473,7 +3473,7 @@ export class CertificateAuthorityServiceClient { 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.listReusableConfigs(request, options, callback); @@ -3523,7 +3523,7 @@ export class CertificateAuthorityServiceClient { 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['listReusableConfigs']; const callSettings = defaultCallSettings.merge(options); @@ -3582,7 +3582,7 @@ export class CertificateAuthorityServiceClient { 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['listReusableConfigs']; const callSettings = defaultCallSettings.merge(options); diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 6b4308958ac..9732089f970 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -33,6 +33,21 @@ import { LocationProtos, } 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 @@ -286,26 +301,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); client.innerApiCalls.createCertificate = stubSimpleCall(expectedResponse); const [response] = await client.createCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificate without error using callback', async () => { @@ -320,15 +334,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); @@ -351,11 +361,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificate with error', async () => { @@ -370,26 +383,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createCertificate(request), expectedError); - assert( - (client.innerApiCalls.createCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificate with closed client', async () => { @@ -404,7 +416,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createCertificate(request), expectedError); @@ -424,26 +439,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); client.innerApiCalls.getCertificate = stubSimpleCall(expectedResponse); const [response] = await client.getCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificate without error using callback', async () => { @@ -458,15 +472,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); @@ -489,11 +499,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificate with error', async () => { @@ -508,26 +521,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getCertificate(request), expectedError); - assert( - (client.innerApiCalls.getCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificate with closed client', async () => { @@ -542,7 +554,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCertificate(request), expectedError); @@ -562,26 +577,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); client.innerApiCalls.revokeCertificate = stubSimpleCall(expectedResponse); const [response] = await client.revokeCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.revokeCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes revokeCertificate without error using callback', async () => { @@ -596,15 +610,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); @@ -627,11 +637,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.revokeCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes revokeCertificate with error', async () => { @@ -646,26 +659,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.revokeCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.revokeCertificate(request), expectedError); - assert( - (client.innerApiCalls.revokeCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes revokeCertificate with closed client', async () => { @@ -680,7 +692,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.revokeCertificate(request), expectedError); @@ -700,27 +715,27 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); client.innerApiCalls.updateCertificate = stubSimpleCall(expectedResponse); const [response] = await client.updateCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificate without error using callback', async () => { @@ -735,16 +750,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() ); @@ -767,11 +779,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificate with error', async () => { @@ -786,27 +801,27 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateCertificate(request), expectedError); - assert( - (client.innerApiCalls.updateCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificate with closed client', async () => { @@ -821,8 +836,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateCertificate(request), expectedError); @@ -842,15 +861,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse() ); @@ -858,11 +874,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchCertificateAuthorityCsr(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCertificateAuthorityCsr without error using callback', async () => { @@ -877,15 +896,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrResponse() ); @@ -908,11 +924,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCertificateAuthorityCsr with error', async () => { @@ -927,15 +946,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( undefined, @@ -945,11 +961,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.fetchCertificateAuthorityCsr(request), expectedError ); - assert( - (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCertificateAuthorityCsr with closed client', async () => { @@ -964,7 +983,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -987,15 +1010,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() ); @@ -1003,11 +1023,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCertificateAuthority(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateAuthority without error using callback', async () => { @@ -1022,15 +1045,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() ); @@ -1053,11 +1073,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateAuthority with error', async () => { @@ -1072,15 +1095,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificateAuthority = stubSimpleCall( undefined, @@ -1090,11 +1110,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.getCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.getCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateAuthority with closed client', async () => { @@ -1109,7 +1132,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1132,26 +1159,23 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() ); client.innerApiCalls.getCaPool = stubSimpleCall(expectedResponse); const [response] = await client.getCaPool(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCaPool without error using callback', async () => { @@ -1166,15 +1190,9 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() ); @@ -1197,11 +1215,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCaPool with error', async () => { @@ -1216,23 +1237,20 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCaPool = stubSimpleCall(undefined, expectedError); await assert.rejects(client.getCaPool(request), expectedError); - assert( - (client.innerApiCalls.getCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCaPool with closed client', async () => { @@ -1247,7 +1265,8 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCaPool(request), expectedError); @@ -1267,26 +1286,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - request.caPool = ''; - const expectedHeaderRequestParams = 'ca_pool='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ + 'caPool', + ]); + request.caPool = defaultValue1; + const expectedHeaderRequestParams = `ca_pool=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsResponse() ); client.innerApiCalls.fetchCaCerts = stubSimpleCall(expectedResponse); const [response] = await client.fetchCaCerts(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchCaCerts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchCaCerts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCaCerts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCaCerts without error using callback', async () => { @@ -1301,15 +1319,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - request.caPool = ''; - const expectedHeaderRequestParams = 'ca_pool='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ + 'caPool', + ]); + request.caPool = defaultValue1; + const expectedHeaderRequestParams = `ca_pool=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsResponse() ); @@ -1332,11 +1346,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchCaCerts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchCaCerts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCaCerts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCaCerts with error', async () => { @@ -1351,26 +1368,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - request.caPool = ''; - const expectedHeaderRequestParams = 'ca_pool='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ + 'caPool', + ]); + request.caPool = defaultValue1; + const expectedHeaderRequestParams = `ca_pool=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchCaCerts = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.fetchCaCerts(request), expectedError); - assert( - (client.innerApiCalls.fetchCaCerts as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchCaCerts as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCaCerts as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCaCerts with closed client', async () => { @@ -1385,7 +1401,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - request.caPool = ''; + const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ + 'caPool', + ]); + request.caPool = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.fetchCaCerts(request), expectedError); @@ -1405,15 +1424,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ); @@ -1421,11 +1437,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCertificateRevocationList(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateRevocationList without error using callback', async () => { @@ -1440,15 +1459,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() ); @@ -1471,11 +1487,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateRevocationList with error', async () => { @@ -1490,15 +1509,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( undefined, @@ -1508,11 +1524,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.getCertificateRevocationList(request), expectedError ); - assert( - (client.innerApiCalls.getCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateRevocationList with closed client', async () => { @@ -1527,7 +1546,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1550,15 +1573,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() ); @@ -1566,11 +1586,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCertificateTemplate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateTemplate without error using callback', async () => { @@ -1585,15 +1608,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() ); @@ -1616,11 +1636,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateTemplate with error', async () => { @@ -1635,15 +1658,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificateTemplate = stubSimpleCall( undefined, @@ -1653,11 +1673,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.getCertificateTemplate(request), expectedError ); - assert( - (client.innerApiCalls.getCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateTemplate with closed client', async () => { @@ -1672,7 +1695,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1695,15 +1722,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1712,11 +1736,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.activateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes activateCertificateAuthority without error using callback', async () => { @@ -1731,15 +1758,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1769,11 +1793,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes activateCertificateAuthority with call error', async () => { @@ -1788,15 +1815,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( undefined, @@ -1806,11 +1830,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.activateCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes activateCertificateAuthority with LRO error', async () => { @@ -1825,15 +1852,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( undefined, @@ -1842,11 +1866,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.activateCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkActivateCertificateAuthorityProgress without error', async () => { @@ -1911,15 +1938,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1928,11 +1952,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.createCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateAuthority without error using callback', async () => { @@ -1947,15 +1974,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1985,11 +2009,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateAuthority with call error', async () => { @@ -2004,15 +2031,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( undefined, @@ -2022,11 +2046,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.createCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateAuthority with LRO error', async () => { @@ -2041,15 +2068,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( undefined, @@ -2058,11 +2082,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.createCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateCertificateAuthorityProgress without error', async () => { @@ -2127,15 +2154,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2144,11 +2168,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.disableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes disableCertificateAuthority without error using callback', async () => { @@ -2163,15 +2190,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2201,11 +2225,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes disableCertificateAuthority with call error', async () => { @@ -2220,15 +2247,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( undefined, @@ -2238,11 +2262,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.disableCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes disableCertificateAuthority with LRO error', async () => { @@ -2257,15 +2284,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( undefined, @@ -2274,11 +2298,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.disableCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDisableCertificateAuthorityProgress without error', async () => { @@ -2343,15 +2370,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2360,11 +2384,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.enableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes enableCertificateAuthority without error using callback', async () => { @@ -2379,15 +2406,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2417,11 +2441,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes enableCertificateAuthority with call error', async () => { @@ -2436,15 +2463,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( undefined, @@ -2454,11 +2478,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.enableCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes enableCertificateAuthority with LRO error', async () => { @@ -2473,15 +2500,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( undefined, @@ -2490,11 +2514,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.enableCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkEnableCertificateAuthorityProgress without error', async () => { @@ -2559,15 +2586,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UndeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2576,11 +2600,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.undeleteCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteCertificateAuthority without error using callback', async () => { @@ -2595,15 +2622,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UndeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2633,11 +2657,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteCertificateAuthority with call error', async () => { @@ -2652,15 +2679,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UndeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCall( undefined, @@ -2670,11 +2694,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.undeleteCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes undeleteCertificateAuthority with LRO error', async () => { @@ -2689,15 +2716,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'UndeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.undeleteCertificateAuthority = stubLongRunningCall( undefined, @@ -2706,11 +2730,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.undeleteCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.undeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.undeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUndeleteCertificateAuthorityProgress without error', async () => { @@ -2775,15 +2802,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2792,11 +2816,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.deleteCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCertificateAuthority without error using callback', async () => { @@ -2811,15 +2838,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2849,11 +2873,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCertificateAuthority with call error', async () => { @@ -2868,15 +2895,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCall( undefined, @@ -2886,11 +2910,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.deleteCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.deleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCertificateAuthority with LRO error', async () => { @@ -2905,15 +2932,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteCertificateAuthority = stubLongRunningCall( undefined, @@ -2922,11 +2946,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.deleteCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteCertificateAuthorityProgress without error', async () => { @@ -2991,16 +3018,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3009,11 +3033,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.updateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateAuthority without error using callback', async () => { @@ -3028,16 +3055,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3067,11 +3091,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateAuthority with call error', async () => { @@ -3086,16 +3113,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( undefined, @@ -3105,11 +3129,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.updateCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateAuthority with LRO error', async () => { @@ -3124,16 +3151,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( undefined, @@ -3142,11 +3166,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.updateCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateCertificateAuthorityProgress without error', async () => { @@ -3211,15 +3238,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3227,11 +3250,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.createCaPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCaPool without error using callback', async () => { @@ -3246,15 +3272,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3284,11 +3306,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCaPool with call error', async () => { @@ -3303,26 +3328,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCaPool = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.createCaPool(request), expectedError); - assert( - (client.innerApiCalls.createCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCaPool with LRO error', async () => { @@ -3337,15 +3361,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCaPool = stubLongRunningCall( undefined, @@ -3354,11 +3374,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.createCaPool(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateCaPoolProgress without error', async () => { @@ -3419,16 +3442,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); - request.caPool = {}; - request.caPool.name = ''; - const expectedHeaderRequestParams = 'ca_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.caPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ + 'caPool', + 'name', + ]); + request.caPool.name = defaultValue1; + const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3436,11 +3456,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.updateCaPool(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCaPool without error using callback', async () => { @@ -3455,16 +3478,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); - request.caPool = {}; - request.caPool.name = ''; - const expectedHeaderRequestParams = 'ca_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.caPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ + 'caPool', + 'name', + ]); + request.caPool.name = defaultValue1; + const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3494,11 +3514,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCaPool with call error', async () => { @@ -3513,27 +3536,27 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); - request.caPool = {}; - request.caPool.name = ''; - const expectedHeaderRequestParams = 'ca_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.caPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ + 'caPool', + 'name', + ]); + request.caPool.name = defaultValue1; + const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCaPool = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.updateCaPool(request), expectedError); - assert( - (client.innerApiCalls.updateCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCaPool with LRO error', async () => { @@ -3548,16 +3571,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); - request.caPool = {}; - request.caPool.name = ''; - const expectedHeaderRequestParams = 'ca_pool.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.caPool ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ + 'caPool', + 'name', + ]); + request.caPool.name = defaultValue1; + const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCaPool = stubLongRunningCall( undefined, @@ -3566,11 +3586,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.updateCaPool(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateCaPoolProgress without error', async () => { @@ -3631,27 +3654,26 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); client.innerApiCalls.deleteCaPool = stubLongRunningCall(expectedResponse); const [operation] = await client.deleteCaPool(request); const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCaPool without error using callback', async () => { @@ -3666,15 +3688,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3704,11 +3722,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCaPool with call error', async () => { @@ -3723,26 +3744,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteCaPool = stubLongRunningCall( undefined, expectedError ); await assert.rejects(client.deleteCaPool(request), expectedError); - assert( - (client.innerApiCalls.deleteCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCaPool with LRO error', async () => { @@ -3757,15 +3777,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteCaPool = stubLongRunningCall( undefined, @@ -3774,11 +3790,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.deleteCaPool(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteCaPool as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCaPool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteCaPoolProgress without error', async () => { @@ -3839,16 +3858,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3857,11 +3873,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.updateCertificateRevocationList(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateRevocationList without error using callback', async () => { @@ -3876,16 +3895,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3915,11 +3931,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateRevocationList with call error', async () => { @@ -3934,16 +3953,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall(undefined, expectedError); @@ -3951,11 +3967,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.updateCertificateRevocationList(request), expectedError ); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateRevocationList with LRO error', async () => { @@ -3970,26 +3989,26 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall(undefined, undefined, expectedError); const [operation] = await client.updateCertificateRevocationList(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateCertificateRevocationListProgress without error', async () => { @@ -4054,15 +4073,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateTemplateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -4071,11 +4087,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.createCertificateTemplate(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateTemplate without error using callback', async () => { @@ -4090,15 +4109,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateTemplateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -4128,11 +4144,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateTemplate with call error', async () => { @@ -4147,15 +4166,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateTemplateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificateTemplate = stubLongRunningCall( undefined, @@ -4165,11 +4181,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.createCertificateTemplate(request), expectedError ); - assert( - (client.innerApiCalls.createCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateTemplate with LRO error', async () => { @@ -4184,15 +4203,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateTemplateRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificateTemplate = stubLongRunningCall( undefined, @@ -4201,11 +4217,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.createCertificateTemplate(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateCertificateTemplateProgress without error', async () => { @@ -4270,15 +4289,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -4287,11 +4303,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.deleteCertificateTemplate(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCertificateTemplate without error using callback', async () => { @@ -4306,15 +4325,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -4344,11 +4360,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.deleteCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCertificateTemplate with call error', async () => { @@ -4363,15 +4382,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCall( undefined, @@ -4381,11 +4397,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.deleteCertificateTemplate(request), expectedError ); - assert( - (client.innerApiCalls.deleteCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes deleteCertificateTemplate with LRO error', async () => { @@ -4400,15 +4419,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DeleteCertificateTemplateRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.deleteCertificateTemplate = stubLongRunningCall( undefined, @@ -4417,11 +4433,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.deleteCertificateTemplate(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.deleteCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDeleteCertificateTemplateProgress without error', async () => { @@ -4486,16 +4505,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); - request.certificateTemplate = {}; - request.certificateTemplate.name = ''; - const expectedHeaderRequestParams = 'certificate_template.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateTemplate ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateTemplateRequest', + ['certificateTemplate', 'name'] + ); + request.certificateTemplate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_template.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -4504,11 +4520,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { const [operation] = await client.updateCertificateTemplate(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateTemplate without error using callback', async () => { @@ -4523,16 +4542,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); - request.certificateTemplate = {}; - request.certificateTemplate.name = ''; - const expectedHeaderRequestParams = 'certificate_template.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateTemplate ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateTemplateRequest', + ['certificateTemplate', 'name'] + ); + request.certificateTemplate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_template.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -4562,11 +4578,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateTemplate with call error', async () => { @@ -4581,16 +4600,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); - request.certificateTemplate = {}; - request.certificateTemplate.name = ''; - const expectedHeaderRequestParams = 'certificate_template.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateTemplate ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateTemplateRequest', + ['certificateTemplate', 'name'] + ); + request.certificateTemplate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_template.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateTemplate = stubLongRunningCall( undefined, @@ -4600,11 +4616,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.updateCertificateTemplate(request), expectedError ); - assert( - (client.innerApiCalls.updateCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateTemplate with LRO error', async () => { @@ -4619,16 +4638,13 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest() ); - request.certificateTemplate = {}; - request.certificateTemplate.name = ''; - const expectedHeaderRequestParams = 'certificate_template.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateTemplate ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateTemplateRequest', + ['certificateTemplate', 'name'] + ); + request.certificateTemplate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_template.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateTemplate = stubLongRunningCall( undefined, @@ -4637,11 +4653,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.updateCertificateTemplate(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateCertificateTemplate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateCertificateTemplateProgress without error', async () => { @@ -4706,15 +4725,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() @@ -4729,11 +4744,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.innerApiCalls.listCertificates = stubSimpleCall(expectedResponse); const [response] = await client.listCertificates(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificates without error using callback', async () => { @@ -4748,15 +4766,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() @@ -4789,11 +4803,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificates with error', async () => { @@ -4808,26 +4825,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificates = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listCertificates(request), expectedError); - assert( - (client.innerApiCalls.listCertificates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificatesStream without error', async () => { @@ -4842,8 +4858,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() @@ -4881,11 +4900,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificates, request) ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4901,8 +4921,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificates.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4929,11 +4952,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificates, request) ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4949,8 +4973,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.Certificate() @@ -4977,11 +5004,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4997,8 +5025,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5016,11 +5047,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5038,15 +5070,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() @@ -5062,11 +5091,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCertificateAuthorities(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateAuthorities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateAuthorities without error using callback', async () => { @@ -5081,15 +5113,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() @@ -5122,11 +5151,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateAuthorities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateAuthorities with error', async () => { @@ -5141,15 +5173,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( undefined, @@ -5159,11 +5188,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.listCertificateAuthorities(request), expectedError ); - assert( - (client.innerApiCalls.listCertificateAuthorities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateAuthoritiesStream without error', async () => { @@ -5178,8 +5210,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() @@ -5222,12 +5258,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5243,8 +5282,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5276,12 +5319,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5297,8 +5343,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateAuthority() @@ -5326,12 +5376,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5347,8 +5400,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -5367,12 +5424,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5390,15 +5450,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() @@ -5413,11 +5469,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.innerApiCalls.listCaPools = stubSimpleCall(expectedResponse); const [response] = await client.listCaPools(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCaPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCaPools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCaPools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCaPools without error using callback', async () => { @@ -5432,15 +5491,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() @@ -5471,11 +5526,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCaPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCaPools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCaPools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCaPools with error', async () => { @@ -5490,26 +5548,25 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCaPools = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listCaPools(request), expectedError); - assert( - (client.innerApiCalls.listCaPools as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCaPools as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCaPools as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCaPoolsStream without error', async () => { @@ -5524,8 +5581,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() @@ -5563,11 +5623,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCaPools, request) ); - assert.strictEqual( - (client.descriptors.page.listCaPools.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCaPools.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5583,8 +5644,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCaPools.createStream = stubPageStreamingCall( undefined, @@ -5613,11 +5677,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCaPools, request) ); - assert.strictEqual( - (client.descriptors.page.listCaPools.createStream as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCaPools.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5633,8 +5698,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CaPool() @@ -5660,11 +5728,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listCaPools.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCaPools.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5680,8 +5749,11 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCaPools.asyncIterate = stubAsyncIterationCall( undefined, @@ -5701,11 +5773,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).args[1], request ); - assert.strictEqual( - (client.descriptors.page.listCaPools.asyncIterate as SinonStub).getCall( - 0 - ).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCaPools.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -5723,15 +5796,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() @@ -5747,11 +5817,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCertificateRevocationLists(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateRevocationLists as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateRevocationLists without error using callback', async () => { @@ -5766,15 +5839,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() @@ -5807,11 +5877,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateRevocationLists as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateRevocationLists with error', async () => { @@ -5826,15 +5899,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( undefined, @@ -5844,11 +5914,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.listCertificateRevocationLists(request), expectedError ); - assert( - (client.innerApiCalls.listCertificateRevocationLists as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateRevocationListsStream without error', async () => { @@ -5863,8 +5936,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() @@ -5910,12 +5987,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5931,8 +6011,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall(undefined, expectedError); @@ -5967,12 +6051,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -5988,8 +6075,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateRevocationList() @@ -6017,12 +6108,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6038,8 +6132,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -6058,12 +6156,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6081,15 +6182,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() @@ -6105,11 +6203,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCertificateTemplates(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateTemplates without error using callback', async () => { @@ -6124,15 +6225,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() @@ -6165,11 +6263,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateTemplates with error', async () => { @@ -6184,15 +6285,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificateTemplates = stubSimpleCall( undefined, @@ -6202,11 +6300,14 @@ describe('v1.CertificateAuthorityServiceClient', () => { client.listCertificateTemplates(request), expectedError ); - assert( - (client.innerApiCalls.listCertificateTemplates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateTemplatesStream without error', async () => { @@ -6221,8 +6322,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() @@ -6265,12 +6370,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificateTemplates, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateTemplates .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6286,8 +6394,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateTemplates.createStream = stubPageStreamingCall(undefined, expectedError); @@ -6319,12 +6431,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificateTemplates, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateTemplates .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6340,8 +6455,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1.CertificateTemplate() @@ -6369,12 +6488,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateTemplates .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -6390,8 +6512,12 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateTemplatesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateTemplates.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -6410,12 +6536,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateTemplates .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -6929,12 +7058,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); it('uses async iteration with listLocations with error', async () => { @@ -6968,12 +7100,15 @@ describe('v1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.locationsClient.descriptors.page.listLocations .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 7ee97aa55a8..0fb53c6c085 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -27,6 +27,21 @@ import {PassThrough} from 'stream'; import {protobuf, LROperation, operationsProtos} 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 @@ -280,26 +295,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); client.innerApiCalls.createCertificate = stubSimpleCall(expectedResponse); const [response] = await client.createCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificate without error using callback', async () => { @@ -314,15 +328,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); @@ -345,11 +355,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificate with error', async () => { @@ -364,26 +377,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.createCertificate(request), expectedError); - assert( - (client.innerApiCalls.createCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificate with closed client', async () => { @@ -398,7 +410,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - request.parent = ''; + const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ + 'parent', + ]); + request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.createCertificate(request), expectedError); @@ -418,26 +433,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); client.innerApiCalls.getCertificate = stubSimpleCall(expectedResponse); const [response] = await client.getCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificate without error using callback', async () => { @@ -452,15 +466,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); @@ -483,11 +493,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificate with error', async () => { @@ -502,26 +515,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getCertificate(request), expectedError); - assert( - (client.innerApiCalls.getCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificate with closed client', async () => { @@ -536,7 +548,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getCertificate(request), expectedError); @@ -556,26 +571,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); client.innerApiCalls.revokeCertificate = stubSimpleCall(expectedResponse); const [response] = await client.revokeCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.revokeCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes revokeCertificate without error using callback', async () => { @@ -590,15 +604,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); @@ -621,11 +631,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.revokeCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes revokeCertificate with error', async () => { @@ -640,26 +653,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.revokeCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.revokeCertificate(request), expectedError); - assert( - (client.innerApiCalls.revokeCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.revokeCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes revokeCertificate with closed client', async () => { @@ -674,7 +686,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.revokeCertificate(request), expectedError); @@ -694,27 +709,27 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); client.innerApiCalls.updateCertificate = stubSimpleCall(expectedResponse); const [response] = await client.updateCertificate(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificate without error using callback', async () => { @@ -729,16 +744,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() ); @@ -761,11 +773,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificate with error', async () => { @@ -780,27 +795,27 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; - const expectedHeaderRequestParams = 'certificate.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; + const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificate = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.updateCertificate(request), expectedError); - assert( - (client.innerApiCalls.updateCertificate as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificate with closed client', async () => { @@ -815,8 +830,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); - request.certificate = {}; - request.certificate.name = ''; + request.certificate ??= {}; + const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ + 'certificate', + 'name', + ]); + request.certificate.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.updateCertificate(request), expectedError); @@ -836,15 +855,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse() ); @@ -852,11 +868,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.fetchCertificateAuthorityCsr(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCertificateAuthorityCsr without error using callback', async () => { @@ -871,15 +890,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrResponse() ); @@ -902,11 +918,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCertificateAuthorityCsr with error', async () => { @@ -921,15 +940,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.fetchCertificateAuthorityCsr = stubSimpleCall( undefined, @@ -939,11 +955,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.fetchCertificateAuthorityCsr(request), expectedError ); - assert( - (client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.fetchCertificateAuthorityCsr as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes fetchCertificateAuthorityCsr with closed client', async () => { @@ -958,7 +977,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'FetchCertificateAuthorityCsrRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -981,15 +1004,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ); @@ -997,11 +1017,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCertificateAuthority(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateAuthority without error using callback', async () => { @@ -1016,15 +1039,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() ); @@ -1047,11 +1067,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateAuthority with error', async () => { @@ -1066,15 +1089,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificateAuthority = stubSimpleCall( undefined, @@ -1084,11 +1104,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.getCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.getCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateAuthority with closed client', async () => { @@ -1103,7 +1126,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1126,15 +1153,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ); @@ -1142,11 +1166,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.getCertificateRevocationList(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateRevocationList without error using callback', async () => { @@ -1161,15 +1188,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() ); @@ -1192,11 +1216,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateRevocationList with error', async () => { @@ -1211,15 +1238,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getCertificateRevocationList = stubSimpleCall( undefined, @@ -1229,11 +1253,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.getCertificateRevocationList(request), expectedError ); - assert( - (client.innerApiCalls.getCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getCertificateRevocationList with closed client', async () => { @@ -1248,7 +1275,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue( + 'GetCertificateRevocationListRequest', + ['name'] + ); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects( @@ -1271,26 +1302,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ); client.innerApiCalls.getReusableConfig = stubSimpleCall(expectedResponse); const [response] = await client.getReusableConfig(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getReusableConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReusableConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getReusableConfig without error using callback', async () => { @@ -1305,15 +1335,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() ); @@ -1336,11 +1362,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.getReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.getReusableConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReusableConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getReusableConfig with error', async () => { @@ -1355,26 +1384,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ + 'name', + ]); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.getReusableConfig = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.getReusableConfig(request), expectedError); - assert( - (client.innerApiCalls.getReusableConfig as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.getReusableConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getReusableConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes getReusableConfig with closed client', async () => { @@ -1389,7 +1417,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - request.name = ''; + const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ + 'name', + ]); + request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); await assert.rejects(client.getReusableConfig(request), expectedError); @@ -1409,15 +1440,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1426,11 +1454,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.activateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes activateCertificateAuthority without error using callback', async () => { @@ -1445,15 +1476,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1483,11 +1511,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes activateCertificateAuthority with call error', async () => { @@ -1502,15 +1533,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( undefined, @@ -1520,11 +1548,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.activateCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes activateCertificateAuthority with LRO error', async () => { @@ -1539,15 +1570,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ActivateCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.activateCertificateAuthority = stubLongRunningCall( undefined, @@ -1556,11 +1584,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.activateCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.activateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkActivateCertificateAuthorityProgress without error', async () => { @@ -1625,15 +1656,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1642,11 +1670,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.createCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateAuthority without error using callback', async () => { @@ -1661,15 +1692,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1699,11 +1727,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateAuthority with call error', async () => { @@ -1718,15 +1749,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( undefined, @@ -1736,11 +1764,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.createCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes createCertificateAuthority with LRO error', async () => { @@ -1755,15 +1786,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'CreateCertificateAuthorityRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.createCertificateAuthority = stubLongRunningCall( undefined, @@ -1772,11 +1800,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.createCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.createCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkCreateCertificateAuthorityProgress without error', async () => { @@ -1841,15 +1872,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1858,11 +1886,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.disableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes disableCertificateAuthority without error using callback', async () => { @@ -1877,15 +1908,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -1915,11 +1943,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes disableCertificateAuthority with call error', async () => { @@ -1934,15 +1965,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( undefined, @@ -1952,11 +1980,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.disableCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes disableCertificateAuthority with LRO error', async () => { @@ -1971,15 +2002,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'DisableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.disableCertificateAuthority = stubLongRunningCall( undefined, @@ -1988,11 +2016,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.disableCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.disableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.disableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkDisableCertificateAuthorityProgress without error', async () => { @@ -2057,15 +2088,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2074,11 +2102,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.enableCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes enableCertificateAuthority without error using callback', async () => { @@ -2093,15 +2124,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2131,11 +2159,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes enableCertificateAuthority with call error', async () => { @@ -2150,15 +2181,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( undefined, @@ -2168,11 +2196,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.enableCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes enableCertificateAuthority with LRO error', async () => { @@ -2187,15 +2218,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'EnableCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.enableCertificateAuthority = stubLongRunningCall( undefined, @@ -2204,11 +2232,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.enableCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.enableCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enableCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkEnableCertificateAuthorityProgress without error', async () => { @@ -2273,15 +2304,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'RestoreCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2290,11 +2318,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.restoreCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.restoreCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes restoreCertificateAuthority without error using callback', async () => { @@ -2309,15 +2340,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'RestoreCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2347,11 +2375,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.restoreCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes restoreCertificateAuthority with call error', async () => { @@ -2366,15 +2397,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'RestoreCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCall( undefined, @@ -2384,11 +2412,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.restoreCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.restoreCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes restoreCertificateAuthority with LRO error', async () => { @@ -2403,15 +2434,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'RestoreCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.restoreCertificateAuthority = stubLongRunningCall( undefined, @@ -2420,11 +2448,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.restoreCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.restoreCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.restoreCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkRestoreCertificateAuthorityProgress without error', async () => { @@ -2489,15 +2520,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ScheduleDeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2508,11 +2536,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes scheduleDeleteCertificateAuthority without error using callback', async () => { @@ -2527,15 +2558,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ScheduleDeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2565,11 +2593,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes scheduleDeleteCertificateAuthority with call error', async () => { @@ -2584,15 +2615,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ScheduleDeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall(undefined, expectedError); @@ -2600,11 +2628,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.scheduleDeleteCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes scheduleDeleteCertificateAuthority with LRO error', async () => { @@ -2619,15 +2650,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); - request.name = ''; - const expectedHeaderRequestParams = 'name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ScheduleDeleteCertificateAuthorityRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.scheduleDeleteCertificateAuthority = stubLongRunningCall(undefined, undefined, expectedError); @@ -2635,11 +2663,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request ); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.scheduleDeleteCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkScheduleDeleteCertificateAuthorityProgress without error', async () => { @@ -2704,16 +2735,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2722,11 +2750,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.updateCertificateAuthority(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateAuthority without error using callback', async () => { @@ -2741,16 +2772,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2780,11 +2808,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateAuthority with call error', async () => { @@ -2799,16 +2830,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( undefined, @@ -2818,11 +2846,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.updateCertificateAuthority(request), expectedError ); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateAuthority with LRO error', async () => { @@ -2837,16 +2868,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest() ); - request.certificateAuthority = {}; - request.certificateAuthority.name = ''; - const expectedHeaderRequestParams = 'certificate_authority.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateAuthority ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateAuthorityRequest', + ['certificateAuthority', 'name'] + ); + request.certificateAuthority.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_authority.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateAuthority = stubLongRunningCall( undefined, @@ -2855,11 +2883,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); const [operation] = await client.updateCertificateAuthority(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateCertificateAuthority as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateAuthority as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateCertificateAuthorityProgress without error', async () => { @@ -2924,16 +2955,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -2942,11 +2970,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const [operation] = await client.updateCertificateRevocationList(request); const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateRevocationList without error using callback', async () => { @@ -2961,16 +2992,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( new protos.google.longrunning.Operation() ); @@ -3000,11 +3028,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { >; const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateRevocationList with call error', async () => { @@ -3019,16 +3050,13 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall(undefined, expectedError); @@ -3036,11 +3064,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.updateCertificateRevocationList(request), expectedError ); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes updateCertificateRevocationList with LRO error', async () => { @@ -3055,26 +3086,26 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest() ); - request.certificateRevocationList = {}; - request.certificateRevocationList.name = ''; - const expectedHeaderRequestParams = 'certificate_revocation_list.name='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + request.certificateRevocationList ??= {}; + const defaultValue1 = getTypeDefaultValue( + 'UpdateCertificateRevocationListRequest', + ['certificateRevocationList', 'name'] + ); + request.certificateRevocationList.name = defaultValue1; + const expectedHeaderRequestParams = `certificate_revocation_list.name=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.updateCertificateRevocationList = stubLongRunningCall(undefined, undefined, expectedError); const [operation] = await client.updateCertificateRevocationList(request); await assert.rejects(operation.promise(), expectedError); - assert( - (client.innerApiCalls.updateCertificateRevocationList as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCertificateRevocationList as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes checkUpdateCertificateRevocationListProgress without error', async () => { @@ -3139,15 +3170,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() @@ -3162,11 +3189,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.innerApiCalls.listCertificates = stubSimpleCall(expectedResponse); const [response] = await client.listCertificates(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificates without error using callback', async () => { @@ -3181,15 +3211,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() @@ -3222,11 +3248,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificates with error', async () => { @@ -3241,26 +3270,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificates = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listCertificates(request), expectedError); - assert( - (client.innerApiCalls.listCertificates as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificatesStream without error', async () => { @@ -3275,8 +3303,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() @@ -3316,11 +3347,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificates, request) ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3336,8 +3368,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificates.createStream = stubPageStreamingCall(undefined, expectedError); @@ -3366,11 +3401,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificates, request) ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3386,8 +3422,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.Certificate() @@ -3414,11 +3453,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3434,8 +3474,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificates.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3453,11 +3496,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listCertificates.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listCertificates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3475,15 +3519,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() @@ -3499,11 +3540,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCertificateAuthorities(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateAuthorities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateAuthorities without error using callback', async () => { @@ -3518,15 +3562,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() @@ -3559,11 +3600,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateAuthorities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateAuthorities with error', async () => { @@ -3578,15 +3622,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificateAuthorities = stubSimpleCall( undefined, @@ -3596,11 +3637,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.listCertificateAuthorities(request), expectedError ); - assert( - (client.innerApiCalls.listCertificateAuthorities as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateAuthorities as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateAuthoritiesStream without error', async () => { @@ -3615,8 +3659,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() @@ -3659,12 +3707,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3680,8 +3731,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateAuthorities.createStream = stubPageStreamingCall(undefined, expectedError); @@ -3713,12 +3768,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listCertificateAuthorities, request) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3734,8 +3792,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateAuthority() @@ -3763,12 +3825,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -3784,8 +3849,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateAuthoritiesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateAuthorities.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -3804,12 +3873,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateAuthorities .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -3827,15 +3899,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() @@ -3851,11 +3920,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listCertificateRevocationLists(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateRevocationLists as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateRevocationLists without error using callback', async () => { @@ -3870,15 +3942,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() @@ -3911,11 +3980,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listCertificateRevocationLists as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateRevocationLists with error', async () => { @@ -3930,15 +4002,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listCertificateRevocationLists = stubSimpleCall( undefined, @@ -3948,11 +4017,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { client.listCertificateRevocationLists(request), expectedError ); - assert( - (client.innerApiCalls.listCertificateRevocationLists as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCertificateRevocationLists as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listCertificateRevocationListsStream without error', async () => { @@ -3967,8 +4039,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() @@ -4014,12 +4090,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4035,8 +4114,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateRevocationLists.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4071,12 +4154,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { request ) ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4092,8 +4178,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CertificateRevocationList() @@ -4121,12 +4211,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4142,8 +4235,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue( + 'ListCertificateRevocationListsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listCertificateRevocationLists.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4162,12 +4259,15 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( + assert( ( client.descriptors.page.listCertificateRevocationLists .asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); @@ -4185,15 +4285,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() @@ -4209,11 +4305,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { stubSimpleCall(expectedResponse); const [response] = await client.listReusableConfigs(request); assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listReusableConfigs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listReusableConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReusableConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listReusableConfigs without error using callback', async () => { @@ -4228,15 +4327,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() @@ -4269,11 +4364,14 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - assert( - (client.innerApiCalls.listReusableConfigs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions /*, callback defined above */) - ); + const actualRequest = ( + client.innerApiCalls.listReusableConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReusableConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listReusableConfigs with error', async () => { @@ -4288,26 +4386,25 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; - const expectedOptions = { - otherArgs: { - headers: { - 'x-goog-request-params': expectedHeaderRequestParams, - }, - }, - }; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.innerApiCalls.listReusableConfigs = stubSimpleCall( undefined, expectedError ); await assert.rejects(client.listReusableConfigs(request), expectedError); - assert( - (client.innerApiCalls.listReusableConfigs as SinonStub) - .getCall(0) - .calledWith(request, expectedOptions, undefined) - ); + const actualRequest = ( + client.innerApiCalls.listReusableConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listReusableConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); it('invokes listReusableConfigsStream without error', async () => { @@ -4322,8 +4419,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() @@ -4363,11 +4463,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listReusableConfigs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listReusableConfigs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReusableConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4383,8 +4484,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listReusableConfigs.createStream = stubPageStreamingCall(undefined, expectedError); @@ -4413,11 +4517,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { .getCall(0) .calledWith(client.innerApiCalls.listReusableConfigs, request) ); - assert.strictEqual( - ( - client.descriptors.page.listReusableConfigs.createStream as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReusableConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4433,8 +4538,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ReusableConfig() @@ -4461,11 +4569,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); @@ -4481,8 +4590,11 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - request.parent = ''; - const expectedHeaderRequestParams = 'parent='; + const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ + 'parent', + ]); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); client.descriptors.page.listReusableConfigs.asyncIterate = stubAsyncIterationCall(undefined, expectedError); @@ -4500,11 +4612,12 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ).getCall(0).args[1], request ); - assert.strictEqual( - ( - client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub - ).getCall(0).args[2].otherArgs.headers['x-goog-request-params'], - expectedHeaderRequestParams + assert( + (client.descriptors.page.listReusableConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); }); }); From 3ed7c04dbc1ef87b15dffb9f2307e29f50ae9e5f 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:00:58 -0700 Subject: [PATCH 106/113] test: use fully qualified request type name in tests (#203) 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 --- .../gapic_certificate_authority_service_v1.ts | 512 ++++++++++-------- ...c_certificate_authority_service_v1beta1.ts | 358 ++++++------ 2 files changed, 475 insertions(+), 395 deletions(-) diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts index 9732089f970..776e5f70468 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1.ts @@ -301,9 +301,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -334,9 +335,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -383,9 +385,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -416,9 +419,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -439,9 +443,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -472,9 +477,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -521,9 +527,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -554,9 +561,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -577,9 +585,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -610,9 +619,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -659,9 +669,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -692,9 +703,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -716,10 +728,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -751,10 +763,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -802,10 +814,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -837,10 +849,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -862,7 +874,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -897,7 +909,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -947,7 +959,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -984,7 +996,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -1011,7 +1023,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1046,7 +1058,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1096,7 +1108,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1133,7 +1145,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1159,7 +1171,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1190,7 +1205,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1237,7 +1255,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1265,7 +1286,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.GetCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCaPoolRequest', ['name']); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.GetCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1286,9 +1310,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ - 'caPool', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.FetchCaCertsRequest', + ['caPool'] + ); request.caPool = defaultValue1; const expectedHeaderRequestParams = `ca_pool=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1319,9 +1344,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ - 'caPool', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.FetchCaCertsRequest', + ['caPool'] + ); request.caPool = defaultValue1; const expectedHeaderRequestParams = `ca_pool=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1368,9 +1394,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ - 'caPool', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.FetchCaCertsRequest', + ['caPool'] + ); request.caPool = defaultValue1; const expectedHeaderRequestParams = `ca_pool=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1401,9 +1428,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.FetchCaCertsRequest() ); - const defaultValue1 = getTypeDefaultValue('FetchCaCertsRequest', [ - 'caPool', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.FetchCaCertsRequest', + ['caPool'] + ); request.caPool = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1425,7 +1453,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1460,7 +1488,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1510,7 +1538,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1547,7 +1575,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1574,7 +1602,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.GetCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -1609,7 +1637,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.GetCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -1659,7 +1687,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.GetCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -1696,7 +1724,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.GetCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.GetCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -1723,7 +1751,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1759,7 +1787,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1816,7 +1844,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1853,7 +1881,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1939,7 +1967,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -1975,7 +2003,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -2032,7 +2060,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -2069,7 +2097,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -2155,7 +2183,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2191,7 +2219,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2248,7 +2276,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2285,7 +2313,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2371,7 +2399,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2407,7 +2435,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2464,7 +2492,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2501,7 +2529,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2587,7 +2615,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UndeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2623,7 +2651,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UndeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2680,7 +2708,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UndeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2717,7 +2745,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'UndeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UndeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2803,7 +2831,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2839,7 +2867,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2896,7 +2924,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2933,7 +2961,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -3020,7 +3048,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -3057,7 +3085,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -3115,7 +3143,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -3153,7 +3181,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -3238,9 +3266,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCaPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3272,9 +3301,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCaPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3328,9 +3358,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCaPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3361,9 +3392,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.CreateCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCaPoolRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.CreateCaPoolRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3443,10 +3475,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); request.caPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ - 'caPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCaPoolRequest', + ['caPool', 'name'] + ); request.caPool.name = defaultValue1; const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3479,10 +3511,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); request.caPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ - 'caPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCaPoolRequest', + ['caPool', 'name'] + ); request.caPool.name = defaultValue1; const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3537,10 +3569,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); request.caPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ - 'caPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCaPoolRequest', + ['caPool', 'name'] + ); request.caPool.name = defaultValue1; const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3572,10 +3604,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.UpdateCaPoolRequest() ); request.caPool ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCaPoolRequest', [ - 'caPool', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.UpdateCaPoolRequest', + ['caPool', 'name'] + ); request.caPool.name = defaultValue1; const expectedHeaderRequestParams = `ca_pool.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3654,9 +3686,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.DeleteCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3688,9 +3721,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.DeleteCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -3744,9 +3778,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.DeleteCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3777,9 +3812,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.DeleteCaPoolRequest() ); - const defaultValue1 = getTypeDefaultValue('DeleteCaPoolRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.DeleteCaPoolRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3860,7 +3896,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -3897,7 +3933,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -3955,7 +3991,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -3991,7 +4027,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -4074,7 +4110,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest', ['parent'] ); request.parent = defaultValue1; @@ -4110,7 +4146,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest', ['parent'] ); request.parent = defaultValue1; @@ -4167,7 +4203,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest', ['parent'] ); request.parent = defaultValue1; @@ -4204,7 +4240,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.CreateCertificateTemplateRequest', ['parent'] ); request.parent = defaultValue1; @@ -4290,7 +4326,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -4326,7 +4362,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -4383,7 +4419,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -4420,7 +4456,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DeleteCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.DeleteCertificateTemplateRequest', ['name'] ); request.name = defaultValue1; @@ -4507,7 +4543,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateTemplate ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest', ['certificateTemplate', 'name'] ); request.certificateTemplate.name = defaultValue1; @@ -4544,7 +4580,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateTemplate ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest', ['certificateTemplate', 'name'] ); request.certificateTemplate.name = defaultValue1; @@ -4602,7 +4638,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateTemplate ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest', ['certificateTemplate', 'name'] ); request.certificateTemplate.name = defaultValue1; @@ -4640,7 +4676,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { ); request.certificateTemplate ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateTemplateRequest', + '.google.cloud.security.privateca.v1.UpdateCertificateTemplateRequest', ['certificateTemplate', 'name'] ); request.certificateTemplate.name = defaultValue1; @@ -4725,9 +4761,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4766,9 +4803,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4825,9 +4863,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4858,9 +4897,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4921,9 +4961,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4973,9 +5014,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -5025,9 +5067,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -5071,7 +5114,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5114,7 +5157,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5174,7 +5217,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5211,7 +5254,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5283,7 +5326,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5344,7 +5387,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5401,7 +5444,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -5450,9 +5493,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -5491,9 +5535,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -5548,9 +5593,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -5581,9 +5627,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -5644,9 +5691,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -5698,9 +5746,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -5749,9 +5798,10 @@ describe('v1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1.ListCaPoolsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCaPoolsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1.ListCaPoolsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -5797,7 +5847,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5840,7 +5890,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5900,7 +5950,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -5937,7 +5987,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6012,7 +6062,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6076,7 +6126,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6133,7 +6183,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -6183,7 +6233,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; @@ -6226,7 +6276,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; @@ -6286,7 +6336,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; @@ -6323,7 +6373,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; @@ -6395,7 +6445,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; @@ -6456,7 +6506,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; @@ -6513,7 +6563,7 @@ describe('v1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateTemplatesRequest', + '.google.cloud.security.privateca.v1.ListCertificateTemplatesRequest', ['parent'] ); request.parent = defaultValue1; diff --git a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts index 0fb53c6c085..b7074082e97 100644 --- a/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts +++ b/packages/google-cloud-security-privateca/test/gapic_certificate_authority_service_v1beta1.ts @@ -295,9 +295,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -328,9 +329,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -377,9 +379,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -410,9 +413,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.CreateCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('CreateCertificateRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.CreateCertificateRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -433,9 +437,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -466,9 +471,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -515,9 +521,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -548,9 +555,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('GetCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -571,9 +579,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -604,9 +613,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -653,9 +663,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -686,9 +697,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest() ); - const defaultValue1 = getTypeDefaultValue('RevokeCertificateRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.RevokeCertificateRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -710,10 +722,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -745,10 +757,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -796,10 +808,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedHeaderRequestParams = `certificate.name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -831,10 +843,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest() ); request.certificate ??= {}; - const defaultValue1 = getTypeDefaultValue('UpdateCertificateRequest', [ - 'certificate', - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRequest', + ['certificate', 'name'] + ); request.certificate.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -856,7 +868,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -891,7 +903,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -941,7 +953,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -978,7 +990,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest() ); const defaultValue1 = getTypeDefaultValue( - 'FetchCertificateAuthorityCsrRequest', + '.google.cloud.security.privateca.v1beta1.FetchCertificateAuthorityCsrRequest', ['name'] ); request.name = defaultValue1; @@ -1005,7 +1017,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1040,7 +1052,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1090,7 +1102,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1127,7 +1139,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1154,7 +1166,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1189,7 +1201,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1239,7 +1251,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1276,7 +1288,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest() ); const defaultValue1 = getTypeDefaultValue( - 'GetCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.GetCertificateRevocationListRequest', ['name'] ); request.name = defaultValue1; @@ -1302,9 +1314,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1335,9 +1348,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedResponse = generateSampleMessage( @@ -1384,9 +1398,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); @@ -1417,9 +1432,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest() ); - const defaultValue1 = getTypeDefaultValue('GetReusableConfigRequest', [ - 'name', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.GetReusableConfigRequest', + ['name'] + ); request.name = defaultValue1; const expectedError = new Error('The client has already been closed.'); client.close(); @@ -1441,7 +1457,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1477,7 +1493,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1534,7 +1550,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1571,7 +1587,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ActivateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ActivateCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1657,7 +1673,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -1693,7 +1709,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -1750,7 +1766,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -1787,7 +1803,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'CreateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.CreateCertificateAuthorityRequest', ['parent'] ); request.parent = defaultValue1; @@ -1873,7 +1889,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1909,7 +1925,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -1966,7 +1982,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2003,7 +2019,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'DisableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.DisableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2089,7 +2105,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2125,7 +2141,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2182,7 +2198,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2219,7 +2235,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'EnableCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.EnableCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2305,7 +2321,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'RestoreCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2341,7 +2357,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'RestoreCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2398,7 +2414,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'RestoreCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2435,7 +2451,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'RestoreCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.RestoreCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2521,7 +2537,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ScheduleDeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2559,7 +2575,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ScheduleDeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2616,7 +2632,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ScheduleDeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2651,7 +2667,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ScheduleDeleteCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.ScheduleDeleteCertificateAuthorityRequest', ['name'] ); request.name = defaultValue1; @@ -2737,7 +2753,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -2774,7 +2790,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -2832,7 +2848,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -2870,7 +2886,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateAuthority ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateAuthorityRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateAuthorityRequest', ['certificateAuthority', 'name'] ); request.certificateAuthority.name = defaultValue1; @@ -2957,7 +2973,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -2994,7 +3010,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -3052,7 +3068,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -3088,7 +3104,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { ); request.certificateRevocationList ??= {}; const defaultValue1 = getTypeDefaultValue( - 'UpdateCertificateRevocationListRequest', + '.google.cloud.security.privateca.v1beta1.UpdateCertificateRevocationListRequest', ['certificateRevocationList', 'name'] ); request.certificateRevocationList.name = defaultValue1; @@ -3170,9 +3186,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3211,9 +3228,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3270,9 +3288,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3303,9 +3322,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3368,9 +3388,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3422,9 +3443,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -3474,9 +3496,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListCertificatesRequest() ); - const defaultValue1 = getTypeDefaultValue('ListCertificatesRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListCertificatesRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -3520,7 +3543,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3563,7 +3586,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3623,7 +3646,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3660,7 +3683,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3732,7 +3755,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3793,7 +3816,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3850,7 +3873,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateAuthoritiesRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateAuthoritiesRequest', ['parent'] ); request.parent = defaultValue1; @@ -3900,7 +3923,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -3943,7 +3966,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -4003,7 +4026,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -4040,7 +4063,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -4115,7 +4138,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -4179,7 +4202,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -4236,7 +4259,7 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { new protos.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest() ); const defaultValue1 = getTypeDefaultValue( - 'ListCertificateRevocationListsRequest', + '.google.cloud.security.privateca.v1beta1.ListCertificateRevocationListsRequest', ['parent'] ); request.parent = defaultValue1; @@ -4285,9 +4308,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4327,9 +4351,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4386,9 +4411,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4419,9 +4445,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4484,9 +4511,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); @@ -4538,9 +4566,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedResponse = [ @@ -4590,9 +4619,10 @@ describe('v1beta1.CertificateAuthorityServiceClient', () => { const request = generateSampleMessage( new protos.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest() ); - const defaultValue1 = getTypeDefaultValue('ListReusableConfigsRequest', [ - 'parent', - ]); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.security.privateca.v1beta1.ListReusableConfigsRequest', + ['parent'] + ); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1}`; const expectedError = new Error('expected'); From 44514aef48cadd1b8c697116d762a7dcaa3a4708 Mon Sep 17 00:00:00 2001 From: Alexander Fenster Date: Thu, 3 Nov 2022 23:39:54 -0700 Subject: [PATCH 107/113] fix(deps): use google-gax v3.5.2 (#207) --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 66d01cb3a9b..9fd235776bb 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -39,7 +39,7 @@ "test": "c8 mocha build/test" }, "dependencies": { - "google-gax": "^3.3.0" + "google-gax": "^3.5.2" }, "devDependencies": { "@types/mocha": "^9.0.0", From 33fb9c461904bee0b0ca79d45b62bf55267cee34 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 10:32:37 +0100 Subject: [PATCH 108/113] chore(deps): update dependency jsdoc to v4 (#209) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 9fd235776bb..bbf0ae8f9ff 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -47,7 +47,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 a0f4d7efb1dd1901582a7ce901f0e570843cfccb Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Thu, 10 Nov 2022 11:16:14 +0100 Subject: [PATCH 109/113] chore(deps): update dependency @types/node to v18 (#205) 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-security-private-ca). --- packages/google-cloud-security-privateca/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index bbf0ae8f9ff..760c4293b2e 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -43,7 +43,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 58305ff5fd15bc8e61b7b1e606b838d44e9c416c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 09:56:13 +0000 Subject: [PATCH 110/113] fix: regenerated protos JS and TS definitions (#210) 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 | 250 +++++++++++++++--- 2 files changed, 219 insertions(+), 33 deletions(-) diff --git a/packages/google-cloud-security-privateca/protos/protos.d.ts b/packages/google-cloud-security-privateca/protos/protos.d.ts index d7f3f27032e..2fbf732d438 100644 --- a/packages/google-cloud-security-privateca/protos/protos.d.ts +++ b/packages/google-cloud-security-privateca/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-security-privateca/protos/protos.js b/packages/google-cloud-security-privateca/protos/protos.js index 77df8331063..8f6ee5c0469 100644 --- a/packages/google-cloud-security-privateca/protos/protos.js +++ b/packages/google-cloud-security-privateca/protos/protos.js @@ -598,6 +598,12 @@ if (object.name != null) message.name = String(object.name); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -632,6 +638,12 @@ message.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.fromObject(object.subordinateConfig); } switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; case "TIER_UNSPECIFIED": case 0: message.tier = 0; @@ -646,6 +658,12 @@ break; } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -763,7 +781,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.Type[message.type] === undefined ? message.type : $root.google.cloud.security.privateca.v1.CertificateAuthority.Type[message.type] : message.type; if (message.config != null && message.hasOwnProperty("config")) object.config = $root.google.cloud.security.privateca.v1.CertificateConfig.toObject(message.config, options); if (message.lifetime != null && message.hasOwnProperty("lifetime")) @@ -773,9 +791,9 @@ if (message.subordinateConfig != null && message.hasOwnProperty("subordinateConfig")) object.subordinateConfig = $root.google.cloud.security.privateca.v1.SubordinateConfig.toObject(message.subordinateConfig, options); if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] : message.tier; + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] : message.tier; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.State[message.state] === undefined ? message.state : $root.google.cloud.security.privateca.v1.CertificateAuthority.State[message.state] : message.state; if (message.pemCaCertificates && message.pemCaCertificates.length) { object.pemCaCertificates = []; for (var j = 0; j < message.pemCaCertificates.length; ++j) @@ -1317,6 +1335,12 @@ if (object.cloudKmsKeyVersion != null) message.cloudKmsKeyVersion = String(object.cloudKmsKeyVersion); switch (object.algorithm) { + default: + if (typeof object.algorithm === "number") { + message.algorithm = object.algorithm; + break; + } + break; case "SIGN_HASH_ALGORITHM_UNSPECIFIED": case 0: message.algorithm = 0; @@ -1376,7 +1400,7 @@ object.KeyVersion = "cloudKmsKeyVersion"; } if (message.algorithm != null && message.hasOwnProperty("algorithm")) { - object.algorithm = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm[message.algorithm] : message.algorithm; + object.algorithm = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.security.privateca.v1.CertificateAuthority.SignHashAlgorithm[message.algorithm] : message.algorithm; if (options.oneofs) object.KeyVersion = "algorithm"; } @@ -1703,6 +1727,12 @@ if (object.name != null) message.name = String(object.name); switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; case "TIER_UNSPECIFIED": case 0: message.tier = 0; @@ -1760,7 +1790,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] : message.tier; + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.security.privateca.v1.CaPool.Tier[message.tier] : message.tier; if (message.issuancePolicy != null && message.hasOwnProperty("issuancePolicy")) object.issuancePolicy = $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.toObject(message.issuancePolicy, options); if (message.publishingOptions != null && message.hasOwnProperty("publishingOptions")) @@ -3077,6 +3107,12 @@ return object; var message = new $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType(); switch (object.signatureAlgorithm) { + default: + if (typeof object.signatureAlgorithm === "number") { + message.signatureAlgorithm = object.signatureAlgorithm; + break; + } + break; case "EC_SIGNATURE_ALGORITHM_UNSPECIFIED": case 0: message.signatureAlgorithm = 0; @@ -3113,7 +3149,7 @@ if (options.defaults) object.signatureAlgorithm = options.enums === String ? "EC_SIGNATURE_ALGORITHM_UNSPECIFIED" : 0; if (message.signatureAlgorithm != null && message.hasOwnProperty("signatureAlgorithm")) - object.signatureAlgorithm = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm[message.signatureAlgorithm] : message.signatureAlgorithm; + object.signatureAlgorithm = options.enums === String ? $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm[message.signatureAlgorithm] === undefined ? message.signatureAlgorithm : $root.google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType.EcKeyType.EcSignatureAlgorithm[message.signatureAlgorithm] : message.signatureAlgorithm; return object; }; @@ -3783,6 +3819,12 @@ if (object.accessUrl != null) message.accessUrl = String(object.accessUrl); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -3866,7 +3908,7 @@ if (message.accessUrl != null && message.hasOwnProperty("accessUrl")) object.accessUrl = message.accessUrl; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateRevocationList.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateRevocationList.State[message.state] === undefined ? message.state : $root.google.cloud.security.privateca.v1.CertificateRevocationList.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) @@ -4110,6 +4152,12 @@ if (object.hexSerialNumber != null) message.hexSerialNumber = String(object.hexSerialNumber); switch (object.revocationReason) { + default: + if (typeof object.revocationReason === "number") { + message.revocationReason = object.revocationReason; + break; + } + break; case "REVOCATION_REASON_UNSPECIFIED": case 0: message.revocationReason = 0; @@ -4173,7 +4221,7 @@ if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) object.hexSerialNumber = message.hexSerialNumber; if (message.revocationReason != null && message.hasOwnProperty("revocationReason")) - object.revocationReason = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationReason] : message.revocationReason; + object.revocationReason = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationReason] === undefined ? message.revocationReason : $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationReason] : message.revocationReason; return object; }; @@ -4701,6 +4749,12 @@ if (object.certificateTemplate != null) message.certificateTemplate = String(object.certificateTemplate); switch (object.subjectMode) { + default: + if (typeof object.subjectMode === "number") { + message.subjectMode = object.subjectMode; + break; + } + break; case "SUBJECT_REQUEST_MODE_UNSPECIFIED": case 0: message.subjectMode = 0; @@ -4801,7 +4855,7 @@ if (message.certificateTemplate != null && message.hasOwnProperty("certificateTemplate")) object.certificateTemplate = message.certificateTemplate; if (message.subjectMode != null && message.hasOwnProperty("subjectMode")) - object.subjectMode = options.enums === String ? $root.google.cloud.security.privateca.v1.SubjectRequestMode[message.subjectMode] : message.subjectMode; + object.subjectMode = options.enums === String ? $root.google.cloud.security.privateca.v1.SubjectRequestMode[message.subjectMode] === undefined ? message.subjectMode : $root.google.cloud.security.privateca.v1.SubjectRequestMode[message.subjectMode] : message.subjectMode; if (message.revocationDetails != null && message.hasOwnProperty("revocationDetails")) object.revocationDetails = $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails.toObject(message.revocationDetails, options); if (message.pemCertificate != null && message.hasOwnProperty("pemCertificate")) @@ -5034,6 +5088,12 @@ return object; var message = new $root.google.cloud.security.privateca.v1.Certificate.RevocationDetails(); switch (object.revocationState) { + default: + if (typeof object.revocationState === "number") { + message.revocationState = object.revocationState; + break; + } + break; case "REVOCATION_REASON_UNSPECIFIED": case 0: message.revocationState = 0; @@ -5097,7 +5157,7 @@ object.revocationTime = null; } if (message.revocationState != null && message.hasOwnProperty("revocationState")) - object.revocationState = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationState] : message.revocationState; + object.revocationState = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationState] === undefined ? message.revocationState : $root.google.cloud.security.privateca.v1.RevocationReason[message.revocationState] : message.revocationState; if (message.revocationTime != null && message.hasOwnProperty("revocationTime")) object.revocationTime = $root.google.protobuf.Timestamp.toObject(message.revocationTime, options); return object; @@ -6839,6 +6899,12 @@ else if (object.key.length >= 0) message.key = object.key; switch (object.format) { + default: + if (typeof object.format === "number") { + message.format = object.format; + break; + } + break; case "KEY_FORMAT_UNSPECIFIED": case 0: message.format = 0; @@ -6877,7 +6943,7 @@ if (message.key != null && message.hasOwnProperty("key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; if (message.format != null && message.hasOwnProperty("format")) - object.format = options.enums === String ? $root.google.cloud.security.privateca.v1.PublicKey.KeyFormat[message.format] : message.format; + object.format = options.enums === String ? $root.google.cloud.security.privateca.v1.PublicKey.KeyFormat[message.format] === undefined ? message.format : $root.google.cloud.security.privateca.v1.PublicKey.KeyFormat[message.format] : message.format; return object; }; @@ -11328,6 +11394,10 @@ for (var i = 0; i < object.knownExtensions.length; ++i) switch (object.knownExtensions[i]) { default: + if (typeof object.knownExtensions[i] === "number") { + message.knownExtensions[i] = object.knownExtensions[i]; + break; + } case "KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED": case 0: message.knownExtensions[i] = 0; @@ -11387,7 +11457,7 @@ if (message.knownExtensions && message.knownExtensions.length) { object.knownExtensions = []; for (var j = 0; j < message.knownExtensions.length; ++j) - object.knownExtensions[j] = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension[message.knownExtensions[j]] : message.knownExtensions[j]; + object.knownExtensions[j] = options.enums === String ? $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension[message.knownExtensions[j]] === undefined ? message.knownExtensions[j] : $root.google.cloud.security.privateca.v1.CertificateExtensionConstraints.KnownCertificateExtension[message.knownExtensions[j]] : message.knownExtensions[j]; } if (message.additionalExtensions && message.additionalExtensions.length) { object.additionalExtensions = []; @@ -13795,6 +13865,12 @@ if (object.name != null) message.name = String(object.name); switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; case "REVOCATION_REASON_UNSPECIFIED": case 0: message.reason = 0; @@ -13858,7 +13934,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.reason] : message.reason; + object.reason = options.enums === String ? $root.google.cloud.security.privateca.v1.RevocationReason[message.reason] === undefined ? message.reason : $root.google.cloud.security.privateca.v1.RevocationReason[message.reason] : message.reason; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; @@ -22843,6 +22919,12 @@ if (object.name != null) message.name = String(object.name); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -22857,6 +22939,12 @@ break; } switch (object.tier) { + default: + if (typeof object.tier === "number") { + message.tier = object.tier; + break; + } + break; case "TIER_UNSPECIFIED": case 0: message.tier = 0; @@ -22901,6 +22989,12 @@ message.subordinateConfig = $root.google.cloud.security.privateca.v1beta1.SubordinateConfig.fromObject(object.subordinateConfig); } switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -23010,9 +23104,9 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type[message.type] === undefined ? message.type : $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Type[message.type] : message.type; if (message.tier != null && message.hasOwnProperty("tier")) - object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier[message.tier] : message.tier; + object.tier = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier[message.tier] === undefined ? message.tier : $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.Tier[message.tier] : message.tier; if (message.config != null && message.hasOwnProperty("config")) object.config = $root.google.cloud.security.privateca.v1beta1.CertificateConfig.toObject(message.config, options); if (message.lifetime != null && message.hasOwnProperty("lifetime")) @@ -23029,7 +23123,7 @@ object.pemCaCertificates[j] = message.pemCaCertificates[j]; } if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.State[message.state] === undefined ? message.state : $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.State[message.state] : message.state; if (message.caCertificateDescriptions && message.caCertificateDescriptions.length) { object.caCertificateDescriptions = []; for (var j = 0; j < message.caCertificateDescriptions.length; ++j) @@ -25008,6 +25102,12 @@ if (object.cloudKmsKeyVersion != null) message.cloudKmsKeyVersion = String(object.cloudKmsKeyVersion); switch (object.algorithm) { + default: + if (typeof object.algorithm === "number") { + message.algorithm = object.algorithm; + break; + } + break; case "SIGN_HASH_ALGORITHM_UNSPECIFIED": case 0: message.algorithm = 0; @@ -25067,7 +25167,7 @@ object.KeyVersion = "cloudKmsKeyVersion"; } if (message.algorithm != null && message.hasOwnProperty("algorithm")) { - object.algorithm = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm[message.algorithm] : message.algorithm; + object.algorithm = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm[message.algorithm] === undefined ? message.algorithm : $root.google.cloud.security.privateca.v1beta1.CertificateAuthority.SignHashAlgorithm[message.algorithm] : message.algorithm; if (options.oneofs) object.KeyVersion = "algorithm"; } @@ -25551,6 +25651,12 @@ if (object.accessUrl != null) message.accessUrl = String(object.accessUrl); switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; case "STATE_UNSPECIFIED": case 0: message.state = 0; @@ -25631,7 +25737,7 @@ if (message.accessUrl != null && message.hasOwnProperty("accessUrl")) object.accessUrl = message.accessUrl; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State[message.state] === undefined ? message.state : $root.google.cloud.security.privateca.v1beta1.CertificateRevocationList.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) @@ -25873,6 +25979,12 @@ if (object.hexSerialNumber != null) message.hexSerialNumber = String(object.hexSerialNumber); switch (object.revocationReason) { + default: + if (typeof object.revocationReason === "number") { + message.revocationReason = object.revocationReason; + break; + } + break; case "REVOCATION_REASON_UNSPECIFIED": case 0: message.revocationReason = 0; @@ -25936,7 +26048,7 @@ if (message.hexSerialNumber != null && message.hasOwnProperty("hexSerialNumber")) object.hexSerialNumber = message.hexSerialNumber; if (message.revocationReason != null && message.hasOwnProperty("revocationReason")) - object.revocationReason = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationReason] : message.revocationReason; + object.revocationReason = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationReason] === undefined ? message.revocationReason : $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationReason] : message.revocationReason; return object; }; @@ -26710,6 +26822,12 @@ return object; var message = new $root.google.cloud.security.privateca.v1beta1.Certificate.RevocationDetails(); switch (object.revocationState) { + default: + if (typeof object.revocationState === "number") { + message.revocationState = object.revocationState; + break; + } + break; case "REVOCATION_REASON_UNSPECIFIED": case 0: message.revocationState = 0; @@ -26773,7 +26891,7 @@ object.revocationTime = null; } if (message.revocationState != null && message.hasOwnProperty("revocationState")) - object.revocationState = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationState] : message.revocationState; + object.revocationState = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationState] === undefined ? message.revocationState : $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.revocationState] : message.revocationState; if (message.revocationTime != null && message.hasOwnProperty("revocationTime")) object.revocationTime = $root.google.protobuf.Timestamp.toObject(message.revocationTime, options); return object; @@ -28689,6 +28807,12 @@ return object; var message = new $root.google.cloud.security.privateca.v1beta1.PublicKey(); switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; case "KEY_TYPE_UNSPECIFIED": case 0: message.type = 0; @@ -28734,7 +28858,7 @@ } } if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.PublicKey.KeyType[message.type] : message.type; + object.type = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.PublicKey.KeyType[message.type] === undefined ? message.type : $root.google.cloud.security.privateca.v1beta1.PublicKey.KeyType[message.type] : message.type; if (message.key != null && message.hasOwnProperty("key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; return object; @@ -34703,6 +34827,12 @@ if (object.name != null) message.name = String(object.name); switch (object.reason) { + default: + if (typeof object.reason === "number") { + message.reason = object.reason; + break; + } + break; case "REVOCATION_REASON_UNSPECIFIED": case 0: message.reason = 0; @@ -34766,7 +34896,7 @@ if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.reason] : message.reason; + object.reason = options.enums === String ? $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.reason] === undefined ? message.reason : $root.google.cloud.security.privateca.v1beta1.RevocationReason[message.reason] : message.reason; if (message.requestId != null && message.hasOwnProperty("requestId")) object.requestId = message.requestId; return object; @@ -40515,6 +40645,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; @@ -40539,6 +40675,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; @@ -40586,7 +40726,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")) @@ -40594,7 +40734,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; }; @@ -44368,6 +44508,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; @@ -44382,6 +44528,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; @@ -44508,9 +44660,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")) @@ -46857,6 +47009,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; @@ -46965,7 +47123,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")) @@ -47767,6 +47925,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; @@ -47783,6 +47947,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; @@ -47821,6 +47991,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; @@ -47891,7 +48065,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")) @@ -47899,7 +48073,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")) @@ -47912,7 +48086,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); @@ -49289,6 +49463,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; @@ -49358,7 +49538,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) @@ -51113,6 +51293,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; @@ -51162,7 +51348,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 35b32736bf207784de0f46fe7702bd2c543d4435 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Nov 2022 02:07:02 -0800 Subject: [PATCH 111/113] chore(main): release 4.1.2 (#197) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(main): release 4.1.2 * 🦉 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 --- .../google-cloud-security-privateca/CHANGELOG.md | 15 +++++++++++++++ .../google-cloud-security-privateca/package.json | 2 +- ...tadata.google.cloud.security.privateca.v1.json | 2 +- ...a.google.cloud.security.privateca.v1beta1.json | 2 +- .../samples/package.json | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/packages/google-cloud-security-privateca/CHANGELOG.md b/packages/google-cloud-security-privateca/CHANGELOG.md index 48435263977..3d94c4a2f9f 100644 --- a/packages/google-cloud-security-privateca/CHANGELOG.md +++ b/packages/google-cloud-security-privateca/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [4.1.2](https://github.com/googleapis/nodejs-security-private-ca/compare/v4.1.1...v4.1.2) (2022-11-11) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#200](https://github.com/googleapis/nodejs-security-private-ca/issues/200)) ([49544f7](https://github.com/googleapis/nodejs-security-private-ca/commit/49544f7cb90fc6c069dc5e6ec069fd8461fe1474)) +* Better support for fallback mode ([#195](https://github.com/googleapis/nodejs-security-private-ca/issues/195)) ([1ade12a](https://github.com/googleapis/nodejs-security-private-ca/commit/1ade12ad4846ed1b5ecf59252f55ba5c78038c5e)) +* Change import long to require ([#196](https://github.com/googleapis/nodejs-security-private-ca/issues/196)) ([09700e4](https://github.com/googleapis/nodejs-security-private-ca/commit/09700e4bc33755d90b01c9723bfb1757f3c85d0e)) +* **deps:** Use google-gax v3.5.2 ([#207](https://github.com/googleapis/nodejs-security-private-ca/issues/207)) ([e8e4b6e](https://github.com/googleapis/nodejs-security-private-ca/commit/e8e4b6ef03b90b3d1d11f062fe5b80267cd6f267)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-security-private-ca/issues/1553)) ([#199](https://github.com/googleapis/nodejs-security-private-ca/issues/199)) ([f4a0948](https://github.com/googleapis/nodejs-security-private-ca/commit/f4a0948dcb2710eef28aeb2a38c122cde28e5681)) +* Preserve default values in x-goog-request-params header ([#201](https://github.com/googleapis/nodejs-security-private-ca/issues/201)) ([b897e4f](https://github.com/googleapis/nodejs-security-private-ca/commit/b897e4fd4cea66e673fe44029f9336cb6ecac5c3)) +* Regenerated protos JS and TS definitions ([#210](https://github.com/googleapis/nodejs-security-private-ca/issues/210)) ([13781d3](https://github.com/googleapis/nodejs-security-private-ca/commit/13781d3d11eaaf2cb04d80f2f48b1c48f28539a9)) +* Remove pip install statements ([#1546](https://github.com/googleapis/nodejs-security-private-ca/issues/1546)) ([#198](https://github.com/googleapis/nodejs-security-private-ca/issues/198)) ([38691a1](https://github.com/googleapis/nodejs-security-private-ca/commit/38691a1aa932c6d9c77b7f6ab254feb4ece8c80e)) +* use google-gax v3.3.0 ([f4a0948](https://github.com/googleapis/nodejs-security-private-ca/commit/f4a0948dcb2710eef28aeb2a38c122cde28e5681)) + ## [4.1.1](https://github.com/googleapis/nodejs-security-private-ca/compare/v4.1.0...v4.1.1) (2022-07-04) diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index 760c4293b2e..c20c3c1026d 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/security-private-ca", - "version": "4.1.1", + "version": "4.1.2", "description": "Privateca client for Node.js", "repository": "googleapis/nodejs-security-private-ca", "license": "Apache-2.0", diff --git a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json index 984cde3359c..b87750aecfe 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1/snippet_metadata.google.cloud.security.privateca.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "4.1.1", + "version": "4.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json index ff6ed6df641..bbfcdfcc5b1 100644 --- a/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json +++ b/packages/google-cloud-security-privateca/samples/generated/v1beta1/snippet_metadata.google.cloud.security.privateca.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-privateca", - "version": "4.1.1", + "version": "4.1.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-security-privateca/samples/package.json b/packages/google-cloud-security-privateca/samples/package.json index 3b1379fee8d..8743580a329 100644 --- a/packages/google-cloud-security-privateca/samples/package.json +++ b/packages/google-cloud-security-privateca/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/security-private-ca": "^4.1.1" + "@google-cloud/security-private-ca": "^4.1.2" }, "devDependencies": { "c8": "^7.1.0", From 0a08307c21b32661628b12db00299b48626a8975 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Fri, 11 Nov 2022 02:11:59 -0800 Subject: [PATCH 112/113] build: add release-please config, fix owlbot-config --- .release-please-manifest.json | 1 + .../{.github => }/.OwlBot.yaml | 6 +- .../.mocharc.js | 2 +- .../.prettierrc.js | 2 +- .../.repo-metadata.json | 4 +- .../google-cloud-security-privateca/README.md | 64 +- .../package.json | 13 +- .../samples/README.md | 912 +++++++++++++++++- .../src/index.ts | 2 +- release-please-config.json | 3 +- 10 files changed, 982 insertions(+), 27 deletions(-) rename packages/google-cloud-security-privateca/{.github => }/.OwlBot.yaml (78%) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c38b0a70276..c4e28a60c6e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -29,6 +29,7 @@ "packages/google-cloud-recommender": "5.0.4", "packages/google-cloud-redis": "3.1.5", "packages/google-cloud-resourcemanager": "4.1.3", + "packages/google-cloud-security-privateca": "4.1.2", "packages/google-cloud-security-publicca": "0.1.3", "packages/google-cloud-shell": "2.0.4", "packages/google-cloud-texttospeech": "4.0.4", diff --git a/packages/google-cloud-security-privateca/.github/.OwlBot.yaml b/packages/google-cloud-security-privateca/.OwlBot.yaml similarity index 78% rename from packages/google-cloud-security-privateca/.github/.OwlBot.yaml rename to packages/google-cloud-security-privateca/.OwlBot.yaml index 5acb4422c01..57f7124c5ff 100644 --- a/packages/google-cloud-security-privateca/.github/.OwlBot.yaml +++ b/packages/google-cloud-security-privateca/.OwlBot.yaml @@ -11,13 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -docker: - image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest deep-remove-regex: - /owl-bot-staging deep-copy-regex: - - source: /google/cloud/security/privateca/(.*)/.*-nodejs/(.*) - dest: /owl-bot-staging/$1/$2 + - source: /google/cloud/security/privateca/(.*)/.*-nodejs + dest: /owl-bot-staging/google-cloud-security-privateca/$1 diff --git a/packages/google-cloud-security-privateca/.mocharc.js b/packages/google-cloud-security-privateca/.mocharc.js index 0b600509bed..cdb7b752160 100644 --- a/packages/google-cloud-security-privateca/.mocharc.js +++ b/packages/google-cloud-security-privateca/.mocharc.js @@ -1,4 +1,4 @@ -// Copyright 2020 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-security-privateca/.prettierrc.js b/packages/google-cloud-security-privateca/.prettierrc.js index d1b95106f4c..d546a4ad546 100644 --- a/packages/google-cloud-security-privateca/.prettierrc.js +++ b/packages/google-cloud-security-privateca/.prettierrc.js @@ -1,4 +1,4 @@ -// Copyright 2020 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-security-privateca/.repo-metadata.json b/packages/google-cloud-security-privateca/.repo-metadata.json index ad0be2b2c8f..fe14c3646da 100644 --- a/packages/google-cloud-security-privateca/.repo-metadata.json +++ b/packages/google-cloud-security-privateca/.repo-metadata.json @@ -6,11 +6,11 @@ "default_version": "v1", "language": "nodejs", "name_pretty": "Certificate Authority Service", - "repo": "googleapis/nodejs-security-private-ca", + "repo": "googleapis/google-cloud-node", "product_documentation": "https://cloud.google.com/certificate-authority-service", "requires_billing": true, "name": "security-private-ca", - "issue_tracker": "https://github.com/googleapis/nodejs-security-private-ca/issues", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", "api_shortname": "privateca", "library_type": "GAPIC_AUTO" } diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index a4825804e28..4036b10bb89 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Certificate Authority Service: Node.js Client](https://github.com/googleapis/nodejs-security-private-ca) +# [Certificate Authority Service: Node.js Client](https://github.com/googleapis/google-cloud-node) [![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/security-private-ca.svg)](https://www.npmjs.org/package/@google-cloud/security-private-ca) @@ -14,11 +14,11 @@ Privateca client for Node.js A comprehensive list of changes in each version may be found in -[the CHANGELOG](https://github.com/googleapis/nodejs-security-private-ca/blob/main/CHANGELOG.md). +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-privateca/CHANGELOG.md). * [Certificate Authority Service Node.js Client API Reference][client-docs] * [Certificate Authority Service Documentation][product-docs] -* [github.com/googleapis/nodejs-security-private-ca](https://github.com/googleapis/nodejs-security-private-ca) +* [github.com/googleapis/google-cloud-node/packages/google-cloud-security-privateca](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-privateca) Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in [Client Libraries Explained][explained]. @@ -84,11 +84,61 @@ listCertificates(); ## Samples -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-security-private-ca/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Quickstart | [source code](https://github.com/googleapis/nodejs-security-private-ca/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-security-private-ca&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | +| Certificate_authority_service.activate_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.create_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js,samples/README.md) | +| Certificate_authority_service.create_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js,samples/README.md) | +| Certificate_authority_service.create_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.create_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js,samples/README.md) | +| Certificate_authority_service.delete_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js,samples/README.md) | +| Certificate_authority_service.delete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.delete_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js,samples/README.md) | +| Certificate_authority_service.disable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.enable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.fetch_ca_certs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js,samples/README.md) | +| Certificate_authority_service.fetch_certificate_authority_csr | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) | +| Certificate_authority_service.get_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js,samples/README.md) | +| Certificate_authority_service.get_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js,samples/README.md) | +| Certificate_authority_service.get_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.get_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) | +| Certificate_authority_service.get_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js,samples/README.md) | +| Certificate_authority_service.list_ca_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js,samples/README.md) | +| Certificate_authority_service.list_certificate_authorities | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) | +| Certificate_authority_service.list_certificate_revocation_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) | +| Certificate_authority_service.list_certificate_templates | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js,samples/README.md) | +| Certificate_authority_service.list_certificates | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js,samples/README.md) | +| Certificate_authority_service.revoke_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js,samples/README.md) | +| Certificate_authority_service.undelete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js,samples/README.md) | +| Certificate_authority_service.update_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js,samples/README.md) | +| Certificate_authority_service.update_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) | +| Certificate_authority_service.update_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js,samples/README.md) | +| Certificate_authority_service.activate_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.create_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js,samples/README.md) | +| Certificate_authority_service.create_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.disable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.enable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.fetch_certificate_authority_csr | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) | +| Certificate_authority_service.get_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js,samples/README.md) | +| Certificate_authority_service.get_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.get_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) | +| Certificate_authority_service.get_reusable_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js,samples/README.md) | +| Certificate_authority_service.list_certificate_authorities | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) | +| Certificate_authority_service.list_certificate_revocation_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) | +| Certificate_authority_service.list_certificates | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js,samples/README.md) | +| Certificate_authority_service.list_reusable_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js,samples/README.md) | +| Certificate_authority_service.restore_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.revoke_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js,samples/README.md) | +| Certificate_authority_service.schedule_delete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js,samples/README.md) | +| Certificate_authority_service.update_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) | @@ -138,7 +188,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages] ## Contributing -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-security-private-ca/blob/main/CONTRIBUTING.md). +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). Please note that this `README.md`, the `samples/README.md`, and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) @@ -150,7 +200,7 @@ to its templates in Apache Version 2.0 -See [LICENSE](https://github.com/googleapis/nodejs-security-private-ca/blob/main/LICENSE) +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [client-docs]: https://cloud.google.com/nodejs/docs/reference/security-private-ca/latest [product-docs]: https://cloud.google.com/certificate-authority-service diff --git a/packages/google-cloud-security-privateca/package.json b/packages/google-cloud-security-privateca/package.json index c20c3c1026d..284878532da 100644 --- a/packages/google-cloud-security-privateca/package.json +++ b/packages/google-cloud-security-privateca/package.json @@ -2,7 +2,11 @@ "name": "@google-cloud/security-private-ca", "version": "4.1.2", "description": "Privateca client for Node.js", - "repository": "googleapis/nodejs-security-private-ca", + "repository": { + "type": "git", + "directory": "packages/google-cloud-security-privateca", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, "license": "Apache-2.0", "author": "Google LLC", "main": "build/src/index.js", @@ -34,8 +38,8 @@ "prelint": "cd samples; npm link ../; npm i", "lint": "gts check", "prepare": "npm run compile-protos && npm run compile", - "samples-test": "cd samples/ && npm link ../ && npm test", - "system-test": "c8 mocha build/system-test", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "system-test": "npm run compile && c8 mocha build/system-test", "test": "c8 mocha build/test" }, "dependencies": { @@ -62,5 +66,6 @@ }, "engines": { "node": ">=12.0.0" - } + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-security-privateca" } diff --git a/packages/google-cloud-security-privateca/samples/README.md b/packages/google-cloud-security-privateca/samples/README.md index 1dc584cc6e4..f36f4208441 100644 --- a/packages/google-cloud-security-privateca/samples/README.md +++ b/packages/google-cloud-security-privateca/samples/README.md @@ -2,7 +2,7 @@ [//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Certificate Authority Service: Node.js Samples](https://github.com/googleapis/nodejs-security-private-ca) +# [Certificate Authority Service: Node.js Samples](https://github.com/googleapis/google-cloud-node) [![Open in Cloud Shell][shell_img]][shell_link] @@ -12,12 +12,62 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Certificate_authority_service.activate_certificate_authority](#certificate_authority_service.activate_certificate_authority) + * [Certificate_authority_service.create_ca_pool](#certificate_authority_service.create_ca_pool) + * [Certificate_authority_service.create_certificate](#certificate_authority_service.create_certificate) + * [Certificate_authority_service.create_certificate_authority](#certificate_authority_service.create_certificate_authority) + * [Certificate_authority_service.create_certificate_template](#certificate_authority_service.create_certificate_template) + * [Certificate_authority_service.delete_ca_pool](#certificate_authority_service.delete_ca_pool) + * [Certificate_authority_service.delete_certificate_authority](#certificate_authority_service.delete_certificate_authority) + * [Certificate_authority_service.delete_certificate_template](#certificate_authority_service.delete_certificate_template) + * [Certificate_authority_service.disable_certificate_authority](#certificate_authority_service.disable_certificate_authority) + * [Certificate_authority_service.enable_certificate_authority](#certificate_authority_service.enable_certificate_authority) + * [Certificate_authority_service.fetch_ca_certs](#certificate_authority_service.fetch_ca_certs) + * [Certificate_authority_service.fetch_certificate_authority_csr](#certificate_authority_service.fetch_certificate_authority_csr) + * [Certificate_authority_service.get_ca_pool](#certificate_authority_service.get_ca_pool) + * [Certificate_authority_service.get_certificate](#certificate_authority_service.get_certificate) + * [Certificate_authority_service.get_certificate_authority](#certificate_authority_service.get_certificate_authority) + * [Certificate_authority_service.get_certificate_revocation_list](#certificate_authority_service.get_certificate_revocation_list) + * [Certificate_authority_service.get_certificate_template](#certificate_authority_service.get_certificate_template) + * [Certificate_authority_service.list_ca_pools](#certificate_authority_service.list_ca_pools) + * [Certificate_authority_service.list_certificate_authorities](#certificate_authority_service.list_certificate_authorities) + * [Certificate_authority_service.list_certificate_revocation_lists](#certificate_authority_service.list_certificate_revocation_lists) + * [Certificate_authority_service.list_certificate_templates](#certificate_authority_service.list_certificate_templates) + * [Certificate_authority_service.list_certificates](#certificate_authority_service.list_certificates) + * [Certificate_authority_service.revoke_certificate](#certificate_authority_service.revoke_certificate) + * [Certificate_authority_service.undelete_certificate_authority](#certificate_authority_service.undelete_certificate_authority) + * [Certificate_authority_service.update_ca_pool](#certificate_authority_service.update_ca_pool) + * [Certificate_authority_service.update_certificate](#certificate_authority_service.update_certificate) + * [Certificate_authority_service.update_certificate_authority](#certificate_authority_service.update_certificate_authority) + * [Certificate_authority_service.update_certificate_revocation_list](#certificate_authority_service.update_certificate_revocation_list) + * [Certificate_authority_service.update_certificate_template](#certificate_authority_service.update_certificate_template) + * [Certificate_authority_service.activate_certificate_authority](#certificate_authority_service.activate_certificate_authority) + * [Certificate_authority_service.create_certificate](#certificate_authority_service.create_certificate) + * [Certificate_authority_service.create_certificate_authority](#certificate_authority_service.create_certificate_authority) + * [Certificate_authority_service.disable_certificate_authority](#certificate_authority_service.disable_certificate_authority) + * [Certificate_authority_service.enable_certificate_authority](#certificate_authority_service.enable_certificate_authority) + * [Certificate_authority_service.fetch_certificate_authority_csr](#certificate_authority_service.fetch_certificate_authority_csr) + * [Certificate_authority_service.get_certificate](#certificate_authority_service.get_certificate) + * [Certificate_authority_service.get_certificate_authority](#certificate_authority_service.get_certificate_authority) + * [Certificate_authority_service.get_certificate_revocation_list](#certificate_authority_service.get_certificate_revocation_list) + * [Certificate_authority_service.get_reusable_config](#certificate_authority_service.get_reusable_config) + * [Certificate_authority_service.list_certificate_authorities](#certificate_authority_service.list_certificate_authorities) + * [Certificate_authority_service.list_certificate_revocation_lists](#certificate_authority_service.list_certificate_revocation_lists) + * [Certificate_authority_service.list_certificates](#certificate_authority_service.list_certificates) + * [Certificate_authority_service.list_reusable_configs](#certificate_authority_service.list_reusable_configs) + * [Certificate_authority_service.restore_certificate_authority](#certificate_authority_service.restore_certificate_authority) + * [Certificate_authority_service.revoke_certificate](#certificate_authority_service.revoke_certificate) + * [Certificate_authority_service.schedule_delete_certificate_authority](#certificate_authority_service.schedule_delete_certificate_authority) + * [Certificate_authority_service.update_certificate](#certificate_authority_service.update_certificate) + * [Certificate_authority_service.update_certificate_authority](#certificate_authority_service.update_certificate_authority) + * [Certificate_authority_service.update_certificate_revocation_list](#certificate_authority_service.update_certificate_revocation_list) * [Quickstart](#quickstart) + * [Quickstart.test](#quickstart.test) ## 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-security-private-ca#using-the-client-library). +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). `cd samples` @@ -29,16 +79,866 @@ Before running the samples, make sure you've followed the steps outlined in +### Certificate_authority_service.activate_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.create_ca_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js` + + +----- + + + + +### Certificate_authority_service.create_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js` + + +----- + + + + +### Certificate_authority_service.create_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.create_certificate_template + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js` + + +----- + + + + +### Certificate_authority_service.delete_ca_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js` + + +----- + + + + +### Certificate_authority_service.delete_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.delete_certificate_template + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js` + + +----- + + + + +### Certificate_authority_service.disable_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.enable_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.fetch_ca_certs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js` + + +----- + + + + +### Certificate_authority_service.fetch_certificate_authority_csr + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js` + + +----- + + + + +### Certificate_authority_service.get_ca_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js` + + +----- + + + + +### Certificate_authority_service.get_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js` + + +----- + + + + +### Certificate_authority_service.get_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.get_certificate_revocation_list + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js` + + +----- + + + + +### Certificate_authority_service.get_certificate_template + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js` + + +----- + + + + +### Certificate_authority_service.list_ca_pools + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js` + + +----- + + + + +### Certificate_authority_service.list_certificate_authorities + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js` + + +----- + + + + +### Certificate_authority_service.list_certificate_revocation_lists + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js` + + +----- + + + + +### Certificate_authority_service.list_certificate_templates + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js` + + +----- + + + + +### Certificate_authority_service.list_certificates + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js` + + +----- + + + + +### Certificate_authority_service.revoke_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js` + + +----- + + + + +### Certificate_authority_service.undelete_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.update_ca_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js` + + +----- + + + + +### Certificate_authority_service.update_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js` + + +----- + + + + +### Certificate_authority_service.update_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.update_certificate_revocation_list + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js` + + +----- + + + + +### Certificate_authority_service.update_certificate_template + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js` + + +----- + + + + +### Certificate_authority_service.activate_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.create_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js` + + +----- + + + + +### Certificate_authority_service.create_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.disable_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.enable_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.fetch_certificate_authority_csr + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js` + + +----- + + + + +### Certificate_authority_service.get_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js` + + +----- + + + + +### Certificate_authority_service.get_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.get_certificate_revocation_list + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js` + + +----- + + + + +### Certificate_authority_service.get_reusable_config + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js` + + +----- + + + + +### Certificate_authority_service.list_certificate_authorities + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js` + + +----- + + + + +### Certificate_authority_service.list_certificate_revocation_lists + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js` + + +----- + + + + +### Certificate_authority_service.list_certificates + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js` + + +----- + + + + +### Certificate_authority_service.list_reusable_configs + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js` + + +----- + + + + +### Certificate_authority_service.restore_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.revoke_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js` + + +----- + + + + +### Certificate_authority_service.schedule_delete_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.update_certificate + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js` + + +----- + + + + +### Certificate_authority_service.update_certificate_authority + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js` + + +----- + + + + +### Certificate_authority_service.update_certificate_revocation_list + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js` + + +----- + + + + ### Quickstart -View the [source code](https://github.com/googleapis/nodejs-security-private-ca/blob/main/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node /workspace/google-cloud-node/samples/quickstart.js` + + +----- + + + + +### Quickstart.test + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.test.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-security-private-ca&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node samples/quickstart.js` +`node /workspace/google-cloud-node/samples/test/quickstart.test.js` @@ -46,5 +946,5 @@ __Usage:__ [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-security-private-ca&page=editor&open_in_editor=samples/README.md +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md [product-docs]: https://cloud.google.com/certificate-authority-service diff --git a/packages/google-cloud-security-privateca/src/index.ts b/packages/google-cloud-security-privateca/src/index.ts index 3c36f768230..a0633155869 100644 --- a/packages/google-cloud-security-privateca/src/index.ts +++ b/packages/google-cloud-security-privateca/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2020 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/release-please-config.json b/release-please-config.json index ca8fb90627b..44e171cb2c1 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -30,6 +30,7 @@ "packages/google-cloud-recommender": {}, "packages/google-cloud-redis": {}, "packages/google-cloud-resourcemanager": {}, + "packages/google-cloud-security-privateca": {}, "packages/google-cloud-security-publicca": {}, "packages/google-cloud-shell": {}, "packages/google-cloud-texttospeech": {}, @@ -49,4 +50,4 @@ } ], "release-type": "node" -} \ No newline at end of file +} From aae294433035996efab3d2497273df17734d348c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 11 Nov 2022 10:37:17 +0000 Subject: [PATCH 113/113] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot?= =?UTF-8?q?=20post-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../google-cloud-security-privateca/README.md | 102 +++--- .../samples/README.md | 306 +++++++++--------- release-please-config.json | 2 +- 3 files changed, 205 insertions(+), 205 deletions(-) diff --git a/packages/google-cloud-security-privateca/README.md b/packages/google-cloud-security-privateca/README.md index 4036b10bb89..285a453b762 100644 --- a/packages/google-cloud-security-privateca/README.md +++ b/packages/google-cloud-security-privateca/README.md @@ -88,57 +88,57 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Certificate_authority_service.activate_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.create_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js,samples/README.md) | -| Certificate_authority_service.create_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js,samples/README.md) | -| Certificate_authority_service.create_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.create_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js,samples/README.md) | -| Certificate_authority_service.delete_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js,samples/README.md) | -| Certificate_authority_service.delete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.delete_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js,samples/README.md) | -| Certificate_authority_service.disable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.enable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.fetch_ca_certs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js,samples/README.md) | -| Certificate_authority_service.fetch_certificate_authority_csr | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) | -| Certificate_authority_service.get_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js,samples/README.md) | -| Certificate_authority_service.get_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js,samples/README.md) | -| Certificate_authority_service.get_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.get_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) | -| Certificate_authority_service.get_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js,samples/README.md) | -| Certificate_authority_service.list_ca_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js,samples/README.md) | -| Certificate_authority_service.list_certificate_authorities | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) | -| Certificate_authority_service.list_certificate_revocation_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) | -| Certificate_authority_service.list_certificate_templates | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js,samples/README.md) | -| Certificate_authority_service.list_certificates | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js,samples/README.md) | -| Certificate_authority_service.revoke_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js,samples/README.md) | -| Certificate_authority_service.undelete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.update_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js,samples/README.md) | -| Certificate_authority_service.update_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js,samples/README.md) | -| Certificate_authority_service.update_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.update_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) | -| Certificate_authority_service.update_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js,samples/README.md) | -| Certificate_authority_service.activate_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.create_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js,samples/README.md) | -| Certificate_authority_service.create_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.disable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.enable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.fetch_certificate_authority_csr | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) | -| Certificate_authority_service.get_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js,samples/README.md) | -| Certificate_authority_service.get_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.get_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) | -| Certificate_authority_service.get_reusable_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js,samples/README.md) | -| Certificate_authority_service.list_certificate_authorities | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) | -| Certificate_authority_service.list_certificate_revocation_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) | -| Certificate_authority_service.list_certificates | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js,samples/README.md) | -| Certificate_authority_service.list_reusable_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js,samples/README.md) | -| Certificate_authority_service.restore_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.revoke_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js,samples/README.md) | -| Certificate_authority_service.schedule_delete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.update_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js,samples/README.md) | -| Certificate_authority_service.update_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js,samples/README.md) | -| Certificate_authority_service.update_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | -| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) | +| Certificate_authority_service.activate_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.create_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js,samples/README.md) | +| Certificate_authority_service.create_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js,samples/README.md) | +| Certificate_authority_service.create_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.create_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js,samples/README.md) | +| Certificate_authority_service.delete_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js,samples/README.md) | +| Certificate_authority_service.delete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.delete_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js,samples/README.md) | +| Certificate_authority_service.disable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.enable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.fetch_ca_certs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js,samples/README.md) | +| Certificate_authority_service.fetch_certificate_authority_csr | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) | +| Certificate_authority_service.get_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js,samples/README.md) | +| Certificate_authority_service.get_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js,samples/README.md) | +| Certificate_authority_service.get_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.get_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) | +| Certificate_authority_service.get_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js,samples/README.md) | +| Certificate_authority_service.list_ca_pools | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js,samples/README.md) | +| Certificate_authority_service.list_certificate_authorities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) | +| Certificate_authority_service.list_certificate_revocation_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) | +| Certificate_authority_service.list_certificate_templates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js,samples/README.md) | +| Certificate_authority_service.list_certificates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js,samples/README.md) | +| Certificate_authority_service.revoke_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js,samples/README.md) | +| Certificate_authority_service.undelete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_ca_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js,samples/README.md) | +| Certificate_authority_service.update_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js,samples/README.md) | +| Certificate_authority_service.update_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) | +| Certificate_authority_service.update_certificate_template | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js,samples/README.md) | +| Certificate_authority_service.activate_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.create_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js,samples/README.md) | +| Certificate_authority_service.create_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.disable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.enable_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.fetch_certificate_authority_csr | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) | +| Certificate_authority_service.get_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js,samples/README.md) | +| Certificate_authority_service.get_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.get_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) | +| Certificate_authority_service.get_reusable_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js,samples/README.md) | +| Certificate_authority_service.list_certificate_authorities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) | +| Certificate_authority_service.list_certificate_revocation_lists | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) | +| Certificate_authority_service.list_certificates | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js,samples/README.md) | +| Certificate_authority_service.list_reusable_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js,samples/README.md) | +| Certificate_authority_service.restore_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.revoke_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js,samples/README.md) | +| Certificate_authority_service.schedule_delete_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_certificate | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js,samples/README.md) | +| Certificate_authority_service.update_certificate_authority | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js,samples/README.md) | +| Certificate_authority_service.update_certificate_revocation_list | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/test/quickstart.test.js,samples/README.md) | diff --git a/packages/google-cloud-security-privateca/samples/README.md b/packages/google-cloud-security-privateca/samples/README.md index f36f4208441..41d5eadd26c 100644 --- a/packages/google-cloud-security-privateca/samples/README.md +++ b/packages/google-cloud-security-privateca/samples/README.md @@ -81,14 +81,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Certificate_authority_service.activate_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.activate_certificate_authority.js` ----- @@ -98,14 +98,14 @@ __Usage:__ ### Certificate_authority_service.create_ca_pool -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_ca_pool.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_ca_pool.js` ----- @@ -115,14 +115,14 @@ __Usage:__ ### Certificate_authority_service.create_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate.js` ----- @@ -132,14 +132,14 @@ __Usage:__ ### Certificate_authority_service.create_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_authority.js` ----- @@ -149,14 +149,14 @@ __Usage:__ ### Certificate_authority_service.create_certificate_template -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.create_certificate_template.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.create_certificate_template.js` ----- @@ -166,14 +166,14 @@ __Usage:__ ### Certificate_authority_service.delete_ca_pool -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_ca_pool.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_ca_pool.js` ----- @@ -183,14 +183,14 @@ __Usage:__ ### Certificate_authority_service.delete_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_authority.js` ----- @@ -200,14 +200,14 @@ __Usage:__ ### Certificate_authority_service.delete_certificate_template -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.delete_certificate_template.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.delete_certificate_template.js` ----- @@ -217,14 +217,14 @@ __Usage:__ ### Certificate_authority_service.disable_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.disable_certificate_authority.js` ----- @@ -234,14 +234,14 @@ __Usage:__ ### Certificate_authority_service.enable_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.enable_certificate_authority.js` ----- @@ -251,14 +251,14 @@ __Usage:__ ### Certificate_authority_service.fetch_ca_certs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_ca_certs.js` ----- @@ -268,14 +268,14 @@ __Usage:__ ### Certificate_authority_service.fetch_certificate_authority_csr -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.fetch_certificate_authority_csr.js` ----- @@ -285,14 +285,14 @@ __Usage:__ ### Certificate_authority_service.get_ca_pool -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_ca_pool.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_ca_pool.js` ----- @@ -302,14 +302,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate.js` ----- @@ -319,14 +319,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_authority.js` ----- @@ -336,14 +336,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate_revocation_list -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_revocation_list.js` ----- @@ -353,14 +353,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate_template -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.get_certificate_template.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.get_certificate_template.js` ----- @@ -370,14 +370,14 @@ __Usage:__ ### Certificate_authority_service.list_ca_pools -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_ca_pools.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_ca_pools.js` ----- @@ -387,14 +387,14 @@ __Usage:__ ### Certificate_authority_service.list_certificate_authorities -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_authorities.js` ----- @@ -404,14 +404,14 @@ __Usage:__ ### Certificate_authority_service.list_certificate_revocation_lists -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_revocation_lists.js` ----- @@ -421,14 +421,14 @@ __Usage:__ ### Certificate_authority_service.list_certificate_templates -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificate_templates.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificate_templates.js` ----- @@ -438,14 +438,14 @@ __Usage:__ ### Certificate_authority_service.list_certificates -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.list_certificates.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.list_certificates.js` ----- @@ -455,14 +455,14 @@ __Usage:__ ### Certificate_authority_service.revoke_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.revoke_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.revoke_certificate.js` ----- @@ -472,14 +472,14 @@ __Usage:__ ### Certificate_authority_service.undelete_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.undelete_certificate_authority.js` ----- @@ -489,14 +489,14 @@ __Usage:__ ### Certificate_authority_service.update_ca_pool -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_ca_pool.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_ca_pool.js` ----- @@ -506,14 +506,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate.js` ----- @@ -523,14 +523,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_authority.js` ----- @@ -540,14 +540,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate_revocation_list -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_revocation_list.js` ----- @@ -557,14 +557,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate_template -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1/certificate_authority_service.update_certificate_template.js` +`node packages/google-cloud-security-privateca/samples/generated/v1/certificate_authority_service.update_certificate_template.js` ----- @@ -574,14 +574,14 @@ __Usage:__ ### Certificate_authority_service.activate_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.activate_certificate_authority.js` ----- @@ -591,14 +591,14 @@ __Usage:__ ### Certificate_authority_service.create_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate.js` ----- @@ -608,14 +608,14 @@ __Usage:__ ### Certificate_authority_service.create_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.create_certificate_authority.js` ----- @@ -625,14 +625,14 @@ __Usage:__ ### Certificate_authority_service.disable_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.disable_certificate_authority.js` ----- @@ -642,14 +642,14 @@ __Usage:__ ### Certificate_authority_service.enable_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.enable_certificate_authority.js` ----- @@ -659,14 +659,14 @@ __Usage:__ ### Certificate_authority_service.fetch_certificate_authority_csr -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.fetch_certificate_authority_csr.js` ----- @@ -676,14 +676,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate.js` ----- @@ -693,14 +693,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_authority.js` ----- @@ -710,14 +710,14 @@ __Usage:__ ### Certificate_authority_service.get_certificate_revocation_list -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_certificate_revocation_list.js` ----- @@ -727,14 +727,14 @@ __Usage:__ ### Certificate_authority_service.get_reusable_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.get_reusable_config.js` ----- @@ -744,14 +744,14 @@ __Usage:__ ### Certificate_authority_service.list_certificate_authorities -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_authorities.js` ----- @@ -761,14 +761,14 @@ __Usage:__ ### Certificate_authority_service.list_certificate_revocation_lists -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificate_revocation_lists.js` ----- @@ -778,14 +778,14 @@ __Usage:__ ### Certificate_authority_service.list_certificates -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_certificates.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_certificates.js` ----- @@ -795,14 +795,14 @@ __Usage:__ ### Certificate_authority_service.list_reusable_configs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.list_reusable_configs.js` ----- @@ -812,14 +812,14 @@ __Usage:__ ### Certificate_authority_service.restore_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.restore_certificate_authority.js` ----- @@ -829,14 +829,14 @@ __Usage:__ ### Certificate_authority_service.revoke_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.revoke_certificate.js` ----- @@ -846,14 +846,14 @@ __Usage:__ ### Certificate_authority_service.schedule_delete_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.schedule_delete_certificate_authority.js` ----- @@ -863,14 +863,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate.js` ----- @@ -880,14 +880,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate_authority -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_authority.js` ----- @@ -897,14 +897,14 @@ __Usage:__ ### Certificate_authority_service.update_certificate_revocation_list -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js` +`node packages/google-cloud-security-privateca/samples/generated/v1beta1/certificate_authority_service.update_certificate_revocation_list.js` ----- @@ -914,14 +914,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-cloud-security-privateca/samples/quickstart.js` ----- @@ -931,14 +931,14 @@ __Usage:__ ### Quickstart.test -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.test.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-security-privateca/samples/test/quickstart.test.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.test.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-security-privateca/samples/test/quickstart.test.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/test/quickstart.test.js` +`node packages/google-cloud-security-privateca/samples/test/quickstart.test.js` diff --git a/release-please-config.json b/release-please-config.json index 44e171cb2c1..a4ad0654551 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -50,4 +50,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file